CVE-2021-39157Improper Handling of Exceptional Conditions in detect-character-encoding
- 7.5HighCVSS base score
- 2.1%Exploitation in 30 daysEPSS · top 18% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
detect-character-encoding is an open source character encoding inspection library. In detect-character-encoding v0.6.0 and earlier, data matching no charset causes the Node.js process to crash. The problem has been patched in [detect-character-encoding v0.7.0](https://github.com/sonicdoe/detect-character-encoding/releases/tag/v0.7.0). No workaround are available and all users should update to resolve this issue.
Timeline
ID reserved
By GitHub_M
- 8 days later
· 8 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVDNVD · Modified | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 2.1% · top 18% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Affected products
sonicdoe · detect-character-encoding
- affected < 0.7.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmdetect-character-encodingGHSA-jqfh-8hw5-fqjr (opens in a new tab)
References
References3
- https://github.com/sonicdoe/detect-character-encoding/security/advisories/GHSA-jqfh-8hw5-fqjr (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/sonicdoe/detect-character-encoding/issues/15 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/sonicdoe/detect-character-encoding/commit/992a11007fff6cfd40b952150ab8d30410c4a20a (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-1781 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-jqfh-8hw5-fqjr (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-39157)Record last updated .