cve.bz

CVE-2021-31597 xmlhttprequest-ssl project xmlhttprequest-ssl: Improper Certificate Validation

9.4 criticalExploit referenceEPSS 2.0%Fix available

Critical (9.4) in xmlhttprequest-ssl project xmlhttprequest-ssl. EPSS 2.0% estimated probability of exploitation activity in the next 30 days. Fixed in xmlhttprequest-ssl 1.6.1.

On this page
The xmlhttprequest-ssl package before 1.6.1 for Node.js disables SSL certificate validation by default, because rejectUnauthorized (when the property exists but is undefined) is considered to be false within the https.request function of Node.js. In other words, no certificate is ever rejected.

Severity

CVSS 3.1

9.4 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
EPSS
2.0% (unchanged from 2.0% a week ago; 2.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 82nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-295 Improper Certificate Validation
OWASP Top 10
A07:2025 Authentication Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-31597 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-31597?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-31597?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-31597 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
xmlhttprequest-ssl_project:xmlhttprequest-sslbefore 1.6.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-72mh-269x-7mh5npmxmlhttprequest-ssl<1.6.11.6.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu18.04:LTS, 20.04:LTSnode-xmlhttprequest-sslno fix listedUBUNTU-CVE-2021-31597
Azure Linux3js-jqueryno fix listedAZL-45213

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

The xmlhttprequest-ssl library is included in Red Hat Quay as a dependency of karma which is only used during testing. The library is not used a runtime reducing the impact of the vulnerability to low for Red Hat Quay.

ProductPackageStateAdvisory
Red Hat 3scale API Management Platform 2systemNot affected
Red Hat Quay 3quay/quay-rhel8Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-31597.

Attack patterns (CAPEC)

  • CAPEC-459 Creating a Rogue Certification Authority Certificate Likelihood: Medium · Severity: Very High
  • CAPEC-475 Signature Spoofing by Improper Validation Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON