Skip to content

C#: Remove the RawUrl sanitizer.#22180

Merged
michaelnebel merged 3 commits into
github:mainfrom
michaelnebel:csharp/rawurl
Jul 15, 2026
Merged

C#: Remove the RawUrl sanitizer.#22180
michaelnebel merged 3 commits into
github:mainfrom
michaelnebel:csharp/rawurl

Conversation

@michaelnebel

@michaelnebel michaelnebel commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #22174

@michaelnebel michaelnebel marked this pull request as ready for review July 13, 2026 14:26
@michaelnebel michaelnebel requested a review from a team as a code owner July 13, 2026 14:26
Copilot AI review requested due to automatic review settings July 13, 2026 14:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes an incorrect RawUrl sanitizer model to restore open-redirect detection.

Changes:

  • Removes the RawUrl URL-redirection barrier.
  • Updates the CWE-601 regression test and expected alert.
  • Adds a change note.
Show a summary per file
File Description
csharp/ql/lib/ext/System.Web.model.yml Removes the incorrect barrier model.
csharp/ql/test/query-tests/Security Features/CWE-601/UrlRedirect/UrlRedirect.cs Marks RawUrl redirection as unsafe.
csharp/ql/test/query-tests/Security Features/CWE-601/UrlRedirect/UrlRedirect.expected Records the restored alert.
csharp/ql/src/change-notes/2026-07-13-CWE-601.md Documents the analysis change.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Medium

@michaelnebel

Copy link
Copy Markdown
Contributor Author

DCA looks good. One new result on mono/mono which is a redirect on the RawUrl.

@michaelnebel michaelnebel requested a review from owen-mc July 14, 2026 12:16
@michaelnebel michaelnebel merged commit 2c161e6 into github:main Jul 15, 2026
22 checks passed
@michaelnebel michaelnebel deleted the csharp/rawurl branch July 15, 2026 09:38
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.

System.Web.HttpRequest.get_RawUrl (C#) modeled as url-redirection barrier causes false-negative open-redirect alerts

3 participants