CVE-2021-31597
CRITICAL 9.4CVSS 3.1Improper Certificate Validation in xmlhttprequest-ssl
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.
- Published
- 23 Apr 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-295
- Also known as
- GHSA-72mh-269x-7mh5
- Sources
- NVDJSONOSV GHSA-72mh-269x-7mh5JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | xmlhttprequest-ssl_project | xmlhttprequest-sslcpe:2.3:a:xmlhttprequest-ssl_project:xmlhttprequest-ssl:*:*:*:*:*:node.js:*:* |
< 1.6.1 | 1.6.1 |
| OSV | npm | xmlhttprequest-ssl | < 1.6.1 | 1.6.1 |
References
- https://github.com/mjwwit/node-XMLHttpRequest/commit/bf53329b61ca6afc5d28f6b8d2dc2e3ca740a9b2 · Patch, Third Party Advisory, WEB
- https://github.com/mjwwit/node-XMLHttpRequest/compare/v1.6.0...1.6.1 · Patch, Release Notes, Third Party Advisory, WEB
- https://people.kingsds.network/wesgarland/xmlhttprequest-ssl-vuln.txt · Exploit, Third Party Advisory, WEB
- https://security.netapp.com/advisory/ntap-20210618-0004/ · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-31597 · ADVISORY
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 23 Apr 2021)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 24 May 2021)