# 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](https://cwe.mitre.org/data/definitions/1333.html)

## 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](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/parser-fuzzing.html) — 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](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/source-dataflow.html) — 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](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Libraries%20and%20parsers%3A%20bounded%20fuzzing%20to%20a%20minimal%20reproducer)

## Referenced by these target playbooks

[OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Web & API](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/web-api.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html) · [Mobile](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/mobile.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## 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](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [MITRE CWE-1333](https://cwe.mitre.org/data/definitions/1333.html)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
