Skip to content
Fencer Vulns
high 7.5

CVE-2021-42717 json

ModSecurity 3.x through 3.0.5 mishandles excessively nested JSON objects.

published 2021-12-07 4 y ago modified 2026-09-08 2 mo ago also BIT-modsecurity-2021-42717 , BIT-modsecurity2-2021-42717 , EUVD-2021-29677

cvss
7.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
3.2%
EPSS 3.2% chance of exploitation in 30 days, percentile 88%
public exploits
0
none known

Summary

ModSecurity 3.x through 3.0.5 mishandles excessively nested JSON objects. Crafted JSON objects with nesting tens-of-thousands deep could result in the web server being unable to service legitimate requests. Even a moderately large (e.g., 300KB) HTTP request can occupy one of the limited NGINX worker processes for minutes and consume almost all of the available CPU on the machine. Modsecurity 2 is similarly vulnerable: the affected versions include 2.8.0 through 2.9.4.

Patch / fix

  • bitnami modsecurity 2.9.5
  • bitnami modsecurity2 2.9.5
  • owasp modsecurity 3.0.6
  • trustwave modsecurity 2.9.5
  • modsecurity Debian 14, Debian 13, Debian 12 3.0.6-1
  • modsecurity-apache Debian 14, Debian 13, Debian 12 2.9.5-1

debian advisories DEBIAN-CVE-2021-42717

  • modsecurity-apache Ubuntu 20.04 LTS 2.9.3-1ubuntu0.1
  • modsecurity-apache Ubuntu Pro 16.04 LTS 2.9.0-1ubuntu0.1~esm1
  • modsecurity-apache Ubuntu Pro 18.04 LTS 2.9.2-1ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2021-42717

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • modsecurity Package Hub 15 SP4, openSUSE Leap 15.4 3.0.10-bp154.2.3.1
  • modsecurity Package Hub 15 SP5, openSUSE Leap 15.5 3.0.10-bp155.3.3.1

opensuse advisories openSUSE-SU-2023:0269-1openSUSE-SU-2023:0257-1

  • mod_security Azure Linux 3.0 2.9.7-8

azure linux advisories AZL-44934

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-42717 updated cvss 7.5

libmodsecurity: crafted JSON objects with nesting could result in the web server being unable to service legitimate requests

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

3.25% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • trustwave.com https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/modsecurity-dos-vulnerability-in-json-parsing-cve-2021-42717/ referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P
OSV 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
bitnami modsecurity
>=2.0.0, <2.9.5
2.9.5
bitnami modsecurity2
>=2.0.0, <2.9.5
2.9.5

Classification

Weakness

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.