Skip to content
Heist/ feed
Back to feed
Medium

ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation

Type: advisorySources: OSV

ts-asn1-der is a collection of utility classes to encode ASN.1 data following DER rule. Incorrect number DER encoding can lead to denial on service for absolute values in the range 2**31 -- 2**32 - 1. The arithmetic in the numBitLen didn't take into account that values in this range could result in a negative result upon applying the >> operator, leading to an infinite loop. The issue is patched in version 1.0.4. If upgrading is not an option, the issue can be mitigated by validating inputs to Asn1Integer to ensure that they are not smaller than -2**31 + 1 and no larger than 2**31 - 1.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-32029
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 08:21 UTC · Revision 1

Source evidence

ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation

core-osv · Original source

Published 7 Apr 2025, 20:13 UTC

ts-asn1-der is a collection of utility classes to encode ASN.1 data following DER rule. Incorrect number DER encoding can lead to denial on service for absolute values in the range 2**31 -- 2**32 - 1. The arithmetic in the numBitLen didn't take into account that values in this range could result in a negative result upon applying the >> operator, leading to an infinite loop. The issue is patched in version 1.0.4. If upgrading is not an option, the issue can be mitigated by validating inputs to Asn1Integer to ensure that they are not smaller than -2**31 + 1 and no larger than 2**31 - 1.

osv:CVE-2025-32029
Complete source record
{
  "id": "f983258c68e7fde1c08dfafc5ddb4996943f746274f16a40d25511a02b37005c",
  "url": "https://osv.dev/vulnerability/CVE-2025-32029",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation",
    "summary": "ts-asn1-der is a collection of utility classes to encode ASN.1 data following DER rule. Incorrect number DER encoding can lead to denial on service for absolute values in the range 2**31 -- 2**32 - 1. The arithmetic in the numBitLen didn't take into account that values in this range could result in a negative result upon applying the >> operator, leading to an infinite loop. The issue is patched in version 1.0.4. If upgrading is not an option, the issue can be mitigated by validating inputs to Asn1Integer to ensure that they are not smaller than -2**31 + 1 and no larger than 2**31 - 1.",
    "evidence": "osv:CVE-2025-32029",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-32029",
      "aliases": [
        "CVE-2025-32029",
        "GHSA-p4qw-7j9g-5h53"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/apeleghq/ts-asn1-der",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "d243462add2093e0a1f268a147558da4a4b86432"
                },
                {
                  "fixed": "b2bc9032cbe19755d234a27d79e47a7e52993af8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.0.4"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b2bc9032cbe19755d234a27d79e47a7e52993af8"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.0.3",
            "1.0.2",
            "1.0.1",
            "1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-32029.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.277829606Z",
      "provider": "osv",
      "references": [
        "https://github.com/ApelegHQ/ts-asn1-der/security/advisories/GHSA-p4qw-7j9g-5h53",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/32xxx/CVE-2025-32029.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-32029",
        "https://github.com/ApelegHQ/ts-asn1-der/commit/b2bc9032cbe19755d234a27d79e47a7e52993af8"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1335",
          "CWE-835"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/32xxx/CVE-2025-32029.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-32029",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 493778,
  "published_at": "2025-04-07T20:13:48.176+00:00"
}