-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Summary
There is a "silent failure" where the http_cors.yaml module fails to detect vulnerabilities due to an incorrect regex pattern with a trailing space. Currently, the test suite (tests/test_yaml_regexes.py) only checks if a regex is syntactically valid, not if it actually matches the expected data.
As a result, http_cors.yaml passes all tests despite being logically broken for real-world scanning.
Description
In nettacker/modules/vuln/http_cors.yaml, the regex (http|https):\\/\\/evil.com contains a trailing space.
Nettacker/nettacker/modules/vuln/http_cors.yaml
Lines 336 to 337 in 2310a83
| Access-Control-Allow-Origin: | |
| regex: "(http|https):\\/\\/evil.com " |
- Expected behavior: Match
https://evil.com - Actual behavior: Fails to match because servers do not append a space to the
Access-Control-Allow-Originheader.
Testing gap: The current tests/test_yaml_regexes.py sees this as a valid regex string and passes it, even though it will never trigger a "Detected" status in a real scan.