CVE-2025-69873: CWE-1333 Inefficient Regular Expression Complexity in ajv.js ajv
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.
AI Analysis
Technical Summary
The vulnerability CVE-2025-69873 affects ajv.js (Another JSON Schema Validator) versions prior to 8.18.0, specifically when the $data option is enabled for dynamic JSON schema validation. The core issue is that the pattern keyword in ajv accepts runtime data via JSON Pointer syntax ($data reference) and passes this data directly to the JavaScript RegExp constructor without any validation or sanitization. This allows an attacker to supply a malicious regular expression pattern, such as "^(a|a)*$", which is known to cause catastrophic backtracking. When combined with crafted input, this leads to exponential increases in CPU usage, effectively causing a denial of service. For example, a 31-character payload can cause approximately 44 seconds of CPU blocking, and each additional character doubles the execution time, making the attack scalable and highly disruptive. This vulnerability is categorized under CWE-1333 (Inefficient Regular Expression Complexity) and CWE-400 (Uncontrolled Resource Consumption). The attack vector requires local access (AV:L) with high attack complexity (AC:H), no privileges (PR:N), and no user interaction (UI:N). The vulnerability impacts availability but does not affect confidentiality or integrity. No known exploits have been reported in the wild. The issue is resolved in ajv versions 8.18.0 and 6.14.0, where input validation or sanitization prevents malicious regex injection. The vulnerability primarily affects APIs and services that use ajv for JSON schema validation with the $data option enabled, which is a feature allowing dynamic schema definitions at runtime.
Potential Impact
The primary impact of CVE-2025-69873 is a denial of service condition caused by excessive CPU consumption due to malicious regular expressions. Organizations running APIs or services that utilize vulnerable versions of ajv with the $data option enabled for dynamic schema validation may experience service outages or degraded performance. This can disrupt business operations, degrade user experience, and potentially cause cascading failures in dependent systems. Since the attack can be triggered by a single HTTP request, it lowers the barrier for attackers to cause significant disruption remotely if they have access to the API endpoint. Although the vulnerability does not compromise data confidentiality or integrity, the availability impact can be severe, especially for high-traffic or critical services. The requirement for local access or high attack complexity reduces the likelihood of widespread exploitation, but targeted attacks against specific organizations remain a concern. The lack of known exploits in the wild suggests limited current exploitation, but the vulnerability should be addressed proactively to prevent future abuse.
Mitigation Recommendations
To mitigate CVE-2025-69873, organizations should upgrade ajv to version 8.18.0 or later, or 6.14.0 or later if using older major versions, where the vulnerability is fixed. If immediate upgrade is not feasible, disable the $data option to prevent runtime injection of regular expressions. Implement input validation and sanitization on any user-supplied data that may be used in regex patterns to prevent malicious payloads. Employ rate limiting and request throttling on APIs using ajv to reduce the impact of potential ReDoS attacks. Monitor application logs and performance metrics for unusual CPU spikes or slowdowns indicative of ReDoS attempts. Consider deploying Web Application Firewalls (WAFs) with rules to detect and block suspicious regex patterns or malformed requests targeting the schema validation endpoints. Conduct regular security assessments and code reviews focusing on dynamic schema validation features. Educate developers about the risks of using dynamic regular expressions without validation. Finally, maintain an incident response plan to quickly address potential denial of service incidents.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, France, Netherlands, Japan, South Korea, India
CVE-2025-69873: CWE-1333 Inefficient Regular Expression Complexity in ajv.js ajv
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2025-69873 affects ajv.js (Another JSON Schema Validator) versions prior to 8.18.0, specifically when the $data option is enabled for dynamic JSON schema validation. The core issue is that the pattern keyword in ajv accepts runtime data via JSON Pointer syntax ($data reference) and passes this data directly to the JavaScript RegExp constructor without any validation or sanitization. This allows an attacker to supply a malicious regular expression pattern, such as "^(a|a)*$", which is known to cause catastrophic backtracking. When combined with crafted input, this leads to exponential increases in CPU usage, effectively causing a denial of service. For example, a 31-character payload can cause approximately 44 seconds of CPU blocking, and each additional character doubles the execution time, making the attack scalable and highly disruptive. This vulnerability is categorized under CWE-1333 (Inefficient Regular Expression Complexity) and CWE-400 (Uncontrolled Resource Consumption). The attack vector requires local access (AV:L) with high attack complexity (AC:H), no privileges (PR:N), and no user interaction (UI:N). The vulnerability impacts availability but does not affect confidentiality or integrity. No known exploits have been reported in the wild. The issue is resolved in ajv versions 8.18.0 and 6.14.0, where input validation or sanitization prevents malicious regex injection. The vulnerability primarily affects APIs and services that use ajv for JSON schema validation with the $data option enabled, which is a feature allowing dynamic schema definitions at runtime.
Potential Impact
The primary impact of CVE-2025-69873 is a denial of service condition caused by excessive CPU consumption due to malicious regular expressions. Organizations running APIs or services that utilize vulnerable versions of ajv with the $data option enabled for dynamic schema validation may experience service outages or degraded performance. This can disrupt business operations, degrade user experience, and potentially cause cascading failures in dependent systems. Since the attack can be triggered by a single HTTP request, it lowers the barrier for attackers to cause significant disruption remotely if they have access to the API endpoint. Although the vulnerability does not compromise data confidentiality or integrity, the availability impact can be severe, especially for high-traffic or critical services. The requirement for local access or high attack complexity reduces the likelihood of widespread exploitation, but targeted attacks against specific organizations remain a concern. The lack of known exploits in the wild suggests limited current exploitation, but the vulnerability should be addressed proactively to prevent future abuse.
Mitigation Recommendations
To mitigate CVE-2025-69873, organizations should upgrade ajv to version 8.18.0 or later, or 6.14.0 or later if using older major versions, where the vulnerability is fixed. If immediate upgrade is not feasible, disable the $data option to prevent runtime injection of regular expressions. Implement input validation and sanitization on any user-supplied data that may be used in regex patterns to prevent malicious payloads. Employ rate limiting and request throttling on APIs using ajv to reduce the impact of potential ReDoS attacks. Monitor application logs and performance metrics for unusual CPU spikes or slowdowns indicative of ReDoS attempts. Consider deploying Web Application Firewalls (WAFs) with rules to detect and block suspicious regex patterns or malformed requests targeting the schema validation endpoints. Conduct regular security assessments and code reviews focusing on dynamic schema validation features. Educate developers about the risks of using dynamic regular expressions without validation. Finally, maintain an incident response plan to quickly address potential denial of service incidents.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2026-01-09T00:00:00.000Z
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 698cce794b57a58fa1b3e299
Added to database: 2/11/2026, 6:46:17 PM
Last enriched: 3/7/2026, 9:14:07 PM
Last updated: 4/6/2026, 7:05:24 PM
Views: 419
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.