Repository navigation
Add ReDoS guidance to the Denial of Service Cheat Sheet - #2947
abhinav-phi wants to merge 1 commit into
Conversation
The Input validation section covers request size, uploads and input-driven resource allocation, but not regular expression denial of service. A single short request can pin a CPU core when input is matched against a regex with nested or overlapping quantifiers on a backtracking engine, and the sheet already recommends exactly this section for email, URL and username validation. Fixes OWASP#2943
|
Thank you for your contribution. This pull request was closed automatically because it does not follow the OWASP Cheat Sheet Series contributing guide. This pull request changes cheat sheet content, and the issue it references (#2943) has not been approved ( What to do: open an issue describing the change and wait for it to be approved and assigned to you. Then open a pull request that ends with If you believe you did follow the guide and this was a mistake, please comment here or open an issue, and a maintainer will review it and reopen the pull request. Closed by the Custodes 🛡️ Custodes-Agent: pr-gate@0.1.0 · Custodes-Attestation: d368209e-604b-4d95-91fd-cea1ae7848e8 · verify |
|
The change is ready, but the issue it references is not acknowledged yet. #2943 describes exactly this change and has not been given The whole change is one bullet in If the issue is approved and assigned to a contributor, this pull request can be reopened as is. |
Description
Adds regular expression denial of service (ReDoS) to the "Input validation" section of the Denial of Service Cheat Sheet.
The section already covers request size, uploads and input-driven resource allocation, and it is exactly the kind of validation where a ReDoS hides: email, URL and username checks are the usual home of a pattern with nested or overlapping quantifiers. On a backtracking engine such a pattern takes exponential time on some inputs, so a single short request can pin a CPU core. Only the JavaScript/TypeScript and Node.js sheets mention this today, so readers on other stacks would not find it.
The new bullet follows the style of the surrounding ones and pairs every claim with a primary source:
regexpfor the linear-time engines, both of which state that match time is linear in the length of the input.RegexOptions.NonBacktrackingandRegex.MatchTimeoutfor the .NET options.The validation-side controls already live in the Input Validation Cheat Sheet, so this links to that section rather than restating it.
Scope
One cheat sheet, one added bullet. No other file is changed.
Checklist
[TEXT](URL)Scope and sourcing (required)
[text](URL).This PR fixes issue #2943.
AI Tool Usage Disclosure
the contents and I affirm the results. The LLM used is
opencode (MiniMax M3.1 Flash)and the prompt used is
add the ReDoS bullet to the Input validation section of the Denial of Service Cheat Sheet as proposed in issue #2943, linking each claim to the primary sources named in the issue. I have independently verified every citation andtechnical claim against the cited source. The change is one bullet in one file; the
local markdownlint, textlint and link checks pass.