Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-39157

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-39157
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:53 UTC · Revision 1

Source evidence

CVE-2021-39157

core-osv · Original source

Published 24 Aug 2021, 19:15 UTC

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.

osv:CVE-2021-39157
Complete source record
{
  "id": "227ac1930930a307e966ec24b70544bb926c731504b8c5d0ac419b9ce1b6956c",
  "url": "https://osv.dev/vulnerability/CVE-2021-39157",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-39157",
    "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.",
    "evidence": "osv:CVE-2021-39157",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-39157",
      "aliases": [
        "CVE-2021-39157",
        "GHSA-jqfh-8hw5-fqjr"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/sonicdoe/detect-character-encoding",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "57f2cf8decd4cc46c15d8d3daca413a006b9a006"
                },
                {
                  "fixed": "992a11007fff6cfd40b952150ab8d30410c4a20a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:detect-character-encoding_project:detect-character-encoding:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.7.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "992a11007fff6cfd40b952150ab8d30410c4a20a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.6.0",
            "v0.5.1",
            "v0.5.0",
            "v0.4.0",
            "v0.3.1",
            "v0.3.0",
            "v0.2.1",
            "v0.2.0",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-39157.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-39157-871caf3a",
                "digest": {
                  "length": 1396,
                  "function_hash": "244521284125772824062875955107530677307"
                },
                "source": "https://github.com/sonicdoe/detect-character-encoding/commit/992a11007fff6cfd40b952150ab8d30410c4a20a",
                "target": {
                  "file": "icuWrapper.cpp",
                  "function": "NAN_METHOD"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:29:19Z"
          }
        }
      ],
      "modified": "2026-10-20T14:29:19.939569674Z",
      "provider": "osv",
      "references": [
        "https://github.com/sonicdoe/detect-character-encoding/commit/992a11007fff6cfd40b952150ab8d30410c4a20a",
        "https://github.com/sonicdoe/detect-character-encoding/issues/15",
        "https://github.com/sonicdoe/detect-character-encoding/security/advisories/GHSA-jqfh-8hw5-fqjr"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-39157",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 389064,
  "published_at": "2021-08-24T19:15:32.127+00:00"
}