CVE-2021-31806
A public proof of concept exists; no exploitation attested.
- Published2021-05-27
- WeaknessCWE-116
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
An issue was discovered in Squid before 4.15 and 5.x before 5.0.6. Due to a memory-management bug, it is vulnerable to a Denial of Service attack (against all clients using the proxy) via HTTP Range request processing.
Timeline
dates in UTC- 2021-05-2713:15CVE publishedNVD
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 9.0 | = 9.0 | no fix published | NVD |
| 10.0 | = 10.0 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 33.x | = 33 | no fix published | NVD |
| 34.x | = 34 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 5.0 | ≥ 5.0, < 5.0.6 | 5.0.6 | NVD |
| 4.15 | < 4.15 | 4.15 | NVD |
1 more product in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- libecapTuxCare:CentOS:8.4all versions · fixed in 1.0.1-2.module_el8.4.0+2010+24c223d9and 1 other package
- libecapRocky Linux:8all versions · fixed in 0:1.0.1-2.module+el8.4.0+404+316a0dc5
- libecapRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:1.0.1-2.module+el8.1.0+4044+36416a77and 3 other packages
- libecapAlmaLinux:8all versions · fixed in 1.0.1-2.module_el8.6.0+2741+01592ae8and 1 other package
- squidUbuntu:20.04:LTSall versions · fixed in 4.10-1ubuntu1.4
- squidTuxCare:RHEL:7all versions · fixed in 7:3.5.20-17.0.3.el7_9.10.tuxcare.els1and 2 other packages
- squidTuxCare:CentOS:8.4all versions · fixed in 7:4.11-4.module_el8.4.0+2010+24c223d9.2.tuxcare.els1
- squidSUSE:Manager Server 4.0all versions · fixed in 4.15-5.26.1
49 more package ranges on OSV.dev
Vendor advisories
squid: improper input validation in HTTP Range header
squid as a component of Red Hat Enterprise Linux 6 · squid.src as a component of Red Hat Enterprise Linux 6 · squid34 as a component of Red Hat Enterprise Linux 6 · +5 more
Red Hat Security Advisory: squid:4 security, bug fix, and enhancement update
Fix
- Vendor fix Red Hat Product Security RHSA-2021:4292 · 30 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 After installing this update, the squid service will be restarted automatically.
- Workaround from the vendor Red Hat Product Security RHSA-2021:4292 · 30 productsMitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
- No fix planned, says the vendor Red Hat Product Security CVE-2021-31806 · 8 productsOut of support scope
Advisories and patches
- www.squid-cache.orgPatch · Vendor Advisory
- github.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-12-04
- Metasploit modules
- 1 moduleauxiliary/dos/http/squid_range_dosrank: normalModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause. Metasploit Framework
Sources
- NVDCVSS 3.16.5read 2026-10-23
- NVDCVSS 2.04read 2026-10-23
- NVDweakness (CWE)CWE-116read 2026-10-23
- FIRST EPSSEPSS score95.3 %read 2026-12-04
- Metasploit FrameworkMetasploit modules1known since 2026-11-01
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- EUVD-2021-18684same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-3v8m-hgx9-fgh9same flawGitHub Advisory Database · CC-BY-4.0
- auxiliary/dos/http/squid_range_dosexploit moduleMetasploit Framework © Rapid7 · BSD-3-Clause
- ALSA-2021:4292advisory covering several CVEsAlmaLinux · MIT
- DLA-2685-1advisory covering several CVEsDebian · LicenseRef-unstated
- DSA-4924-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0237advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2021-1240advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2021:0879-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:1961-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11403-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2021:4292advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2021:4292advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2021:1838-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1961-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4981-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Published
- 2021-05-27
- Last modified
- 2026-06-17
- NVD status
- Modified
- GitHub advisory
- GHSA-3v8m-hgx9-fgh9
Frequently asked questions
What is CVE-2021-31806?
Is CVE-2021-31806 actively exploited?
What is the CVSS score for CVE-2021-31806?
Running squid? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website checks · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-3v8m-hgx9-fgh9
- Metasploit Framework · BSD-3-Clause
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0