Security readout for executives and security teams
Plain-English summary
Applications using detect-character-encoding before 0.7.0 can be crashed by data the library cannot classify. The impact is denial of service, not data theft or code execution based on the supplied sources. Internet-facing services that analyze user-supplied files should treat this as urgent.
Executive priority
High priority for any service that parses user-controlled content because a crash can interrupt availability. The fix path is straightforward: update the dependency. There is no sourced evidence of data compromise or active exploitation.
Technical view
CVE-2021-39157 is CWE-755 in sonicdoe/detect-character-encoding. Versions 0.6.0 and earlier, reported as <0.7.0, mishandle exceptional input where no charset matches, causing the Node.js process to crash. CVSS 3.1 is 7.5 with unauthenticated availability impact only. Fixed in v0.7.0.
Likely exposure
Exposure exists where Node.js applications directly or transitively depend on detect-character-encoding <0.7.0 and process untrusted or externally supplied content. The bundle does not identify specific downstream products.
Exploitation context
The provided sources describe a crash condition and do not show active exploitation. CISA KEV status is false in the bundle. Treat exploitation as plausible for exposed parsing paths, but not confirmed as observed in the wild.
Researcher notes
The advisory links the fault to unmatched charset handling and the fix commit. Sources do not provide broader ecosystem impact or exploitation telemetry. Validate real exposure by dependency resolution and whether attacker-controlled content reaches this library.
Mitigation direction
- Upgrade detect-character-encoding to v0.7.0 or later.
- Regenerate lockfiles so vulnerable transitive copies are removed.
- Redeploy affected Node.js services after dependency updates.
- If upgrade timing is constrained, consult vendor guidance; no workaround is named.
- Prioritize services processing uploads, email, archives, or external text content.
Validation and detection
- Check package manifests and lockfiles for detect-character-encoding versions below 0.7.0.
- Inspect SBOM and dependency scan results for transitive vulnerable copies.
- Confirm production builds resolve to detect-character-encoding 0.7.0 or later.
- Review logs for unexplained Node.js process crashes in content-processing paths.
- Run the project’s normal regression tests after updating dependencies.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-755: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupCVE-2021-39157 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- High
- CVSS
- 7.5 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H3.93.6Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
7.5HighVector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/sonicdoe/detect-character-encoding/security/advisories/GHSA-jqfh-8hw5-fqjrCVE reference · x_refsource_CONFIRM
- https://github.com/sonicdoe/detect-character-encoding/issues/15CVE reference · x_refsource_MISC
- https://github.com/sonicdoe/detect-character-encoding/commit/992a11007fff6cfd40b952150ab8d30410c4a20aCVE reference · x_refsource_MISC
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
Improper Handling of Exceptional Conditions
Improper Handling of Exceptional Conditions represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
