OWASP / OWASP/Nettacker

Silent failure in http_cors.yaml due to unvalidated regex logic

Open
#1,374 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.6k
Forks
1.2k
Avg merge
1d 21h
Merged PRs (30d)
16

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.
https://github.com/OWASP/Nettacker/blob/2310a8398f788bf7c3b767a153da151ab2a49445/nettacker/modules/vuln/http_cors.yaml#L336-L337

  • Expected behavior: Match https://evil.com
  • Actual behavior: Fails to match because servers do not append a space to the Access-Control-Allow-Origin header.

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with nettacker/modules/vuln/http_cors.yaml at the referenced regex and inspect tests/test_yaml_regexes.py to understand the current validation. Update the behavior so the expected https://evil.com value is matched, and extend the test coverage beyond syntax validity to verify matching data produces the expected detection result.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.