CVE-2021-39157
HIGH 7.5CVSS 3.1Improper Handling of Exceptional Conditions in detect-character-encoding
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. No workaround are available and all users should update to resolve this issue.
- Published
- 24 Aug 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-755
- Also known as
- GHSA-jqfh-8hw5-fqjr
- Sources
- NVDJSONOSV GHSA-jqfh-8hw5-fqjrJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | detect-character-encoding_project | detect-character-encodingcpe:2.3:a:detect-character-encoding_project:detect-character-encoding:*:*:*:*:*:node.js:*:* |
< 0.7.0 | 0.7.0 |
| OSV | npm | detect-character-encoding | < 0.7.0 | 0.7.0 |
References
- https://github.com/sonicdoe/detect-character-encoding/commit/992a11007fff6cfd40b952150ab8d30410c4a20a · Patch, Third Party Advisory, WEB
- https://github.com/sonicdoe/detect-character-encoding/issues/15 · Exploit, Third Party Advisory, WEB
- https://github.com/sonicdoe/detect-character-encoding/security/advisories/GHSA-jqfh-8hw5-fqjr · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-39157 · ADVISORY
- https://github.com/sonicdoe/detect-character-encoding · PACKAGE
- https://github.com/sonicdoe/detect-character-encoding/releases/tag/v0.7.0 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 24 Aug 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 25 Aug 2021)