CVE-2020-8192: Fastify denial of service via allErrors schema validation option

CVE-2020-8192 · Severity: info · CVSS 5.3 · Published 2020-08-05

Fastify is a popular Node.js web framework used to build fast APIs and web applications. A vulnerability in versions 2.14.1 and 3.0.0-rc.4 allows attackers to cause resource exhaustion and service outages by sending specially crafted schema validation requests when the allErrors option is enabled. This could impact the availability and responsiveness of web services built on affected Fastify versions.

Technologies: fastify (npm). Vendors: npm.

Quick answers

Is CVE-2020-8192 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2020-8192 being exploited in the wild.
How severe is CVE-2020-8192?
Informational severity, with a CVSS score of 5.3, published 5 August 2020.
Which products and versions are affected?
fastify (npm) SEMVER:introduced=0,fixed=2.15.1.
Is there a fix for CVE-2020-8192?
Yes. fastify (npm): upgrade to 2.15.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2020-8192 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2020-8192?
Check whether you run fastify (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • fastify (npm): upgrade to 2.15.1 or later
    npm install fastify@2.15.1

Technical details

The vulnerability is a resource exhaustion / denial-of-service condition in Fastify's JSON schema validation logic, specifically when the allErrors option is enabled in the Ajv validator configuration. An attacker can craft malicious schemas that trigger excessive validation error collection, consuming CPU and memory resources. The attack requires no authentication and is network-reachable; the attacker needs only to send HTTP requests with payloads that match the vulnerable schema patterns. The impact is service degradation or complete unavailability. The fix disables allErrors in the default Ajv configuration (patched in 2.15.1).

Affected products

  • Fastify fastify 0 through 2.15.0, 3.0.0-rc.1 through 3.0.0-rc.4

Identifiers

  • CVE-2020-8192
  • GHSA-xw5p-hw6r-2j98

Timeline

  • 2020-08-05: disclosed
  • 2020-08-05: patched: Fastify 2.15.1 released with fix

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.