Regular-expression denial of service
An attacker-controlled string makes the chosen regular-expression engine perform excessive backtracking or other disproportionate matching work.
Candidate CWE: CWE-1333
Test hypothesis#
Identify engine/version, exact pattern, matching API, and reachable input length. Benchmark a small bounded progression of near-matching synthetic strings in an isolated process with a hard timeout. Compare the same lengths with normal strings and a safe pattern or engine configuration.
Evidence required#
Pattern, engine/version, accepted input path, lengths versus elapsed work, timeout ceiling, and consumer concurrency/limits where known. A dangerous-looking regex is a hypothesis until its real engine and input contract are checked.
Rule out false positives#
Engine guarantees bounded matching for this feature set; short upstream input limits defeat the claimed effect; or most time is spent outside the matcher.
Playbook and command references#
- Libraries and parsers: bounded fuzzing to a minimal reproducer — Build a realistic local harness, instrument the target, bound fuzzing resources, and turn unique faults into defensible library or consumer reports.
- Source review: entry point to protected operation — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
Find the associated command snippets
Referenced by these target playbooks#
Report checklist#
- Capture the affected version, configuration, identities, and object ownership.
- Preserve a valid baseline and a negative control.
- Reproduce the forbidden data access, action, or state change on controlled fixtures.
- Explain the intended security rule and why the observed behavior violates it.
- State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.
Conditional ATT&CK mapping#
No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the mapping guide.