8000 fix: response splitting rules and tests by theseion · Pull Request #4009 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: response splitting rules and tests #4009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

theseion
Copy link
Contributor

Response splitting can be achieved by injecting carriage return / new line characters at various places (headers, GET / POST arguments, cookies...). Some web servers or applications may be vulnerable to encoded injections (especially in URL paths), hence we explicitly decode URL encoding, where necessary.

httpd and nginx are not vulnerable to header splitting and will respond with status 400.

HTML entity decoding does not make sense in this context. No web server should ever decode HTML as part of the HTTP protocol. It is unclear why the original authors used t:htmlEntityDecode in some places, but at least in one test, a query argument separator (&) precedes a %0d, which leads to successful decoding of the escape sequence as HTML entity. This may explain an accidental use of t:htmlEntityDecode.

Fixes #3824

8000
Copy link
Contributor
github-actions bot commented Feb 22, 2025

📊 Quantitative test results for language: eng, year: 2023, size: 10K, paranoia level: 1:
🚀 Quantitative testing did not detect new false positives

Response splitting can be achieved by injecting carriage return / new
line characters at various places (headers, GET / POST arguments,
cookies...). Some web servers or applications may be vulnerable to
encoded injections (especially in URL paths), hence we explicitly decode
URL encoding, where necessary.

httpd and nginx are not vulnerable to header splitting and will respond
with status 400.

HTML entity decoding does not make sense in this context. No web server
should ever decode HTML as part of the HTTP protocol. It is unclear why
the original authors used `t:htmlEntityDecode` in some places, but at
least in one test, a query argument separator (`&`) precedes a `%0d`,
which leads to successful decoding of the escape sequence as HTML
entity. This may explain an accidental use of `t:htmlEntityDecode`.

Fixes coreruleset#3824
@theseion theseion force-pushed the fix-response-splitting-rules branch from e7976c4 to 9765a82 Compare February 22, 2025 09:41
Copy link
Contributor
@franbuehler franbuehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@theseion theseion added this pull request to the merge queue Feb 22, 2025
Merged via the queue into coreruleset:main with commit 7015f9d Feb 22, 2025
6 checks passed
@theseion theseion deleted the fix-response-splitting-rules branch February 22, 2025 14:00
@fzipi fzipi changed the title fix: fix response splitting rules and tests fix: response splitting rules and tests Feb 22, 2025
@fzipi
Copy link
Member
fzipi commented Feb 22, 2025

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarification on outcomes for tests for rule 921140
3 participants
0