CVE-2021-42717

NameCVE-2021-42717
DescriptionModSecurity 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3031-1, DSA-5023-1, ELA-619-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
modsecurity (PTS)buster (security), buster, buster (lts)3.0.3-1+deb10u2vulnerable
bullseye3.0.4-2vulnerable
bookworm3.0.9-1+deb12u1fixed
sid, trixie3.0.13-1fixed
modsecurity-apache (PTS)jessie, jessie (lts)2.8.0-3+deb8u2fixed
stretch (security)2.9.1-2+deb9u1fixed
stretch (lts), stretch2.9.1-2+deb9u2fixed
buster (security), buster, buster (lts)2.9.3-1+deb10u2fixed
bullseye2.9.3-3+deb11u2fixed
bullseye (security)2.9.3-3+deb11u1fixed
bookworm2.9.7-1fixed
sid, trixie2.9.8-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
modsecuritysource(unstable)3.0.6-1
modsecurity-apachesourcejessie2.8.0-3+deb8u1ELA-619-1
modsecurity-apachesourcestretch2.9.1-2+deb9u1DLA-3031-1
modsecurity-apachesourcebuster2.9.3-1+deb10u1DSA-5023-1
modsecurity-apachesourcebullseye2.9.3-3+deb11u1DSA-5023-1
modsecurity-apachesource(unstable)2.9.5-1

Notes

[bullseye] - modsecurity <no-dsa> (Minor issue; does not have connector packages in Debian)
[buster] - modsecurity <no-dsa> (Minor issue; does not have connector packages in Debian)
https://github.com/SpiderLabs/ModSecurity/issues/2647
https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/modsecurity-dos-vulnerability-in-json-parsing-cve-2021-42717/
Fixed by: https://github.com/SpiderLabs/ModSecurity/commit/41918335fa4c74fba46a986771a5a6cb457070c4 (v2.9.5)
Fixed by: https://github.com/SpiderLabs/ModSecurity/commit/ac79c1c29b7e6323e26cc984ad4f76ef62c731cd (v3.0.6)

Search for package or bug name: Reporting problems