Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-39176

detect-character-encoding is a package for detecting character encoding using ICU. In detect-character-encoding v0.3.0 and earlier, allocated memory is not released. The problem has been patched in detect-character-encoding v0.3.1.

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

Source evidence

CVE-2021-39176

core-osv · Original source

Published 31 Aug 2021, 18:15 UTC

detect-character-encoding is a package for detecting character encoding using ICU. In detect-character-encoding v0.3.0 and earlier, allocated memory is not released. The problem has been patched in detect-character-encoding v0.3.1.

osv:CVE-2021-39176
Complete source record
{
  "id": "f587f83a1427721de804cf278191f2576c398ec9884cbf079023df6e97f4b7aa",
  "url": "https://osv.dev/vulnerability/CVE-2021-39176",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-39176",
    "summary": "detect-character-encoding is a package for detecting character encoding using ICU. In detect-character-encoding v0.3.0 and earlier, allocated memory is not released. The problem has been patched in detect-character-encoding v0.3.1.",
    "evidence": "osv:CVE-2021-39176",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-39176",
      "aliases": [
        "CVE-2021-39176",
        "GHSA-5rwj-j5m3-3chj"
      ],
      "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": "19bbbb2ec25fb6f30f0ec1202d90f7568921bd87"
                },
                {
                  "fixed": "d44356927b92e3b13e178071bf6d7c671766f588"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:detect-character-encoding_project:detect-character-encoding:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.3.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d44356927b92e3b13e178071bf6d7c671766f588"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "19bbbb2ec25fb6f30f0ec1202d90f7568921bd87"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v0.3.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "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-39176.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-39176-131b3d79",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "13408327678877304456975407656688676524",
                    "120584694468257360971568936664209899744",
                    "4022055859797529272442285157709371966",
                    "194409028033557739133378128099937422143",
                    "159446497483835865618998386825336247769",
                    "209327658693303945781423438306504388981",
                    "141173879481676723128512032734821997272",
                    "177342942665869635409755168872643286127",
                    "205021917407427534105529260337061008168",
                    "118062108046861521403820063569311331165",
                    "260104711269267740172011151045159518087",
                    "155550867351282366072322880850049297290",
                    "2127235777952485018900461792342956008",
                    "39179829604589586862994793427449749458",
                    "102224735839491004734866963062540467058",
                    "217924404446977606099364293203185145867",
                    "284510871259388585649974747591240290018",
                    "268911694072267953811827044974814943886",
                    "199243353681064088395305529017596385077",
                    "266427056194956355902074222894519361119"
                  ]
                },
                "source": "https://github.com/sonicdoe/detect-character-encoding/commit/d44356927b92e3b13e178071bf6d7c671766f588",
                "target": {
                  "file": "icuWrapper.cpp"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-39176-6d8e583a",
                "digest": {
                  "length": 1301,
                  "function_hash": "290557703995622132170331849265200079583"
                },
                "source": "https://github.com/sonicdoe/detect-character-encoding/commit/d44356927b92e3b13e178071bf6d7c671766f588",
                "target": {
                  "file": "icuWrapper.cpp",
                  "function": "NAN_METHOD"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:29:20Z"
          }
        }
      ],
      "modified": "2026-10-20T14:29:20.362623861Z",
      "provider": "osv",
      "references": [
        "https://github.com/sonicdoe/detect-character-encoding/releases/tag/v0.3.1",
        "https://github.com/sonicdoe/detect-character-encoding/commit/d44356927b92e3b13e178071bf6d7c671766f588",
        "https://github.com/sonicdoe/detect-character-encoding/pull/6",
        "https://github.com/sonicdoe/detect-character-encoding/security/advisories/GHSA-5rwj-j5m3-3chj"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-39176",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 389065,
  "published_at": "2021-08-31T18:15:08.49+00:00"
}