Unvalidated Output Injection
High
- Category
- Output Handling
- Content
def dig(domain, rtype="A"): """Use system dig if available, fall back to socket.""" try: out = subprocess.run( ["dig", "+short", "+timeout=5", rtype, domain], capture_output=True, text=True, timeout=10 )- Confidence
- 89% confidence
- Finding
- User-controlled domain and record type values are passed directly to the dig command without validation. Although shell injection is avoided, an attacker can supply option-like values such as domains beginning with '-' or unexpected record types, which may alter dig's behavior, trigger unintended network queries, or be abused for argument injection against the external tool.
