Skip to content
Fencer Vulns
critical 9.4

CVE-2021-31597 json

Improper Certificate Validation in xmlhttprequest-ssl

published 2021-04-22 5 y ago modified 2026-06-17 4 mo ago also GHSA-72mh-269x-7mh5 , EUVD-2021-0980

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

Summary

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.

Patch / fix

  • npm xmlhttprequest-ssl 1.6.1
  • xmlhttprequest-ssl_project xmlhttprequest-ssl 1.6.1

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-31597 updated cvss 9.4

xmlhttprequest-ssl: SSL certificate validation disabled by default

  • Red Hat Quay 3 quay/quay-rhel8
    affected: no fix available “Fix deferred”
  • Red Hat 3scale API Management Platform 2 system
    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

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

Exploits and checks

  • people.kingsds.network https://people.kingsds.network/wesgarland/xmlhttprequest-ssl-vuln.txt referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

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

Affected packages

ecosystem package affected fixed in
npm xmlhttprequest-ssl
<1.6.1
1.6.1

Classification

Weakness
  • CWE-295 Improper Certificate Validation

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.