CVE-2021-39157 json
Improper Handling of Exceptional Conditions in detect-character-encoding
published 2021-08-24 5 y ago modified 2026-07-08 4 mo ago also GHSA-jqfh-8hw5-fqjr , EUVD-2021-1781
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.1%
- EPSS 2.1% chance of exploitation in 30 days, percentile 81%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm detect-character-encoding 0.7.0
- detect-character-encoding_project detect-character-encoding 0.7.0
Exploit prediction
2.07% chance of exploitation in the next 30 days, higher than 81% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/sonicdoe/detect-character-encoding/security/advisories/GHSA-jqfh-8hw5-fqjr referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/sonicdoe/detect-character-encoding/issues/15 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | detect-character-encoding | <0.7.0 |
0.7.0 |
Affected products
- sonicdoe detect-character-encoding
Classification
- Weakness
-
- CWE-755 Improper Handling of Exceptional Conditions
References
-
github.com
/sonicdoe/detect-character-encoding/commit/992a11007fff6cfd40b952150ab8d30410c4a20a
web, patch, third-party-advisory
-
github.com
/sonicdoe/detect-character-encoding/security/advisories/GHSA-jqfh-8hw5-fqjr
web, exploit, third-party-advisory
-
github.com
/sonicdoe/detect-character-encoding/issues/15
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-39157
advisory
-
github.com
/sonicdoe/detect-character-encoding
package
-
github.com
/sonicdoe/detect-character-encoding/releases/tag/v0.7.0
web
Sources
- CVE List CVE-2021-39157
- GitHub Advisory GHSA-jqfh-8hw5-fqjr
- NVD CVE-2021-39157
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.