Skip to content

Fix parser differential caused by URI fragment truncation#115

Open
Easton97-Jens wants to merge 1 commit into
v3/masterfrom
codex/fix-fragment-stripping-vulnerability-in-modsecurity
Open

Fix parser differential caused by URI fragment truncation#115
Easton97-Jens wants to merge 1 commit into
v3/masterfrom
codex/fix-fragment-stripping-vulnerability-in-modsecurity

Conversation

@Easton97-Jens
Copy link
Copy Markdown
Owner

Motivation

  • Prevent a parser differential where bytes after a literal # in the request-target are removed from REQUEST_URI, QUERY_STRING, and ARGS_GET while backends/connectors may still see them.
  • Restore consistent inspection so attacker-controlled query data after # is not hidden from standard ModSecurity variables.

Description

  • Remove the unconditional truncation of the request URI at the first literal # in Transaction::processURI so subsequent decoding and query extraction use the full received request-target (src/transaction.cc).
  • Keep the change minimal and localized to processURI so REQUEST_URI_RAW and REQUEST_LINE behavior is unchanged while REQUEST_URI, QUERY_STRING, and ARGS_GET are populated from the full URI.

Testing

  • No automated tests were executed in this environment against the modified code.
  • An automated build/configure attempt previously failed in this environment due to a missing others/libinjection submodule, preventing running the repository's full regression harness, so CI/regression tests should be run externally after this change.

Codex Task

@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant