Arbitrary code execution via exec() in response_conditions_matched
Summary response_conditions_matched() in nettacker/core/lib/http.py evaluates the responsetime condition using exec() with an operator taken directly from module YAML.
This allows arbitrary Python execution if a crafted module provides a malicious condition string.
Location: nettacker/core/lib/http.py ~line 95 Vulnerable pattern exec( f"matched = response['responsetime'] " f"{conditions['responsetime'].split()[0]} " f"{conditions['responsetime'].split()[1]}" )
Since the operator comes from YAML, a condition like:
conditions: responsetime: ">= 0 or import('os').system('id')"
would execute arbitrary code during scan.
Fix
Replace exec() with explicit operator dispatch:
ops = { '==': float.eq, '!=': float.ne, '>=': float.ge, '<=': float.le, '>': float.gt, '<': float.lt, }