Improper Handling of Exceptional Conditions in detect-character-encoding
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sonicdoe | detect-character-encoding | before 0.7.0 | 0.7.0 | Patch available | CNA |
| — | detect-character-encoding (npm) | before 0.7.0 | 0.7.0 | Patch available | GHSA-jqfh-8hw5-fqjr |
- detect-character-encoding Vendorsonicdoe Affected before 0.7.0 Fixed in 0.7.0 Patch available CNA
- detect-character-encoding (npm) Vendor— Affected before 0.7.0 Fixed in 0.7.0 Patch available GHSA-jqfh-8hw5-fqjr
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:detect-character-encoding_project:detect-character-encoding:*:*:*:*:*:node.js:*:* | before 0.7.0 | Vulnerable | Detect-character-encoding Project |
- cpe:2.3:a:detect-character-encoding_project:detect-character-encoding:*:*:*:*:*:node.js:*:* Versions before 0.7.0 Vulnerable ·Detect-character-encoding Project
Remediation
- Fix · CNA detect-character-encoding (sonicdoe) Fixed in 0.7.0
- Fix · GHSA-jqfh-8hw5-fqjr detect-character-encoding (npm) Fixed in 0.7.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-39157
- 2026-10-03 Alias added: GHSA-jqfh-8hw5-fqjr
References
Exploit 2
More Detect-character-encoding Project Detect-character-encoding vulnerabilities
- TI-2021-16562 Missing Release of Memory after Effective Lifetime in detect-character-encoding CVSS 3.1HIGH 7.5
Sources
- CVE-2021-39157 · CVE Program
- CVE-2021-39157 · NVD
- FIRST EPSS
- GHSA-jqfh-8hw5-fqjr · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences