# CVE-2025-32029: ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2025-04-07T20:13:48.176Z
- Modified: 2026-06-17T09:11:20.903Z
- Also known as: GHSA-p4qw-7j9g-5h53
- Weaknesses: CWE-835, CWE-1335
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- ApelegHQ ts-asn1-der: < 1.0.4
- @apeleghq/asn1-der (npm): before 1.0.4

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `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`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/ApelegHQ/ts-asn1-der/security/advisories/GHSA-p4qw-7j9g-5h53> (web)
- <https://github.com/ApelegHQ/ts-asn1-der/commit/b2bc9032cbe19755d234a27d79e47a7e52993af8> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-32029> (advisory)
- <https://github.com/ApelegHQ/ts-asn1-der> (package)

## Sources

- CVE List: [CVE-2025-32029](https://www.cve.org/CVERecord?id=CVE-2025-32029), CVE Terms of Use, modified 2025-04-08
- GitHub Advisory Database: [GHSA-p4qw-7j9g-5h53](https://github.com/advisories/GHSA-p4qw-7j9g-5h53), CC-BY-4.0, modified 2025-04-08
- NVD: [CVE-2025-32029](https://nvd.nist.gov/vuln/detail/CVE-2025-32029), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-32029 · Whole record: https://cve.day/CVE-2025-32029.json · Rebuilt by cve.day 2026-11-25T22:58:56.169Z
