Vulnerability library
Security checkMarch 02, 2026

ajv has ReDoS when using `$data` option

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmajv

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

ajv (Another JSON Schema Validator) through version 8.17.1 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.

Recommendation

Update the ajv package to the latest compatible version. Followings are version details:

  • Affected version(s): **< 6.14.0 >= 7.0.0-alpha.0, < 8.18.0**
  • Patched version(s): **6.14.0 8.18.0**

References

Could your website be exposed too?

SmartScanner can check your website for ajv has ReDoS when using `$data` option and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 02, 2026