Skip to content

fix(runner): remove exponential backtracking from the content-disposition filename regex - #5639

Merged
mmabrouk merged 1 commit into
release/v0.107.0from
fix/attachment-filename-redos
Aug 1, 2026
Merged

fix(runner): remove exponential backtracking from the content-disposition filename regex#5639
mmabrouk merged 1 commit into
release/v0.107.0from
fix/attachment-filename-redos

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Aug 1, 2026

Copy link
Copy Markdown
Member

CodeQL flagged the quoted-filename regex in the runner's attachment client (js/redos, high): the escape branch \\. and the plain branch [^"] both match a backslash, so an unterminated quote full of escape pairs backtracks exponentially. The header comes from our own API, so exploitation needs a compromised or misbehaving server, but the fix is one character class: the plain branch now excludes the backslash, making the alternation unambiguous and linear. A regression test feeds the hostile shape (50,000 escape pairs, no closing quote) and bounds the parse time. Well-formed inputs parse identically, pinned by the existing cases.

https://claude.ai/code/session_01McMogkcDRV7UpSAjfd8VKG

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 1, 2026 6:29pm

Request Review

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. tests labels Aug 1, 2026
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 48feb2ea-a917-4c8d-a82f-e8694d3b1ee2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk
mmabrouk merged commit 5acb136 into release/v0.107.0 Aug 1, 2026
33 of 34 checks passed
@mmabrouk
mmabrouk deleted the fix/attachment-filename-redos branch August 1, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant