Vulnerabilities in pkg:npm/@apeleghq/asn1-der
PACKAGECVE-2025-32029 is a MODERATE denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting @apeleghq/asn1 der libraries in the npm ecosystem. The issue involves ts-asn1-der has incorrect der encoding of numbers leading to denial of service and incorrect value representation. Remediation is available by upgrading affected packages to version 1.0.4.
pkg:npm/@apeleghq/asn1-der
Vulnerability advisories affecting package pkg:npm/@apeleghq/asn1-der. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-p4qw-7j9g-5h53 | CVE-2025-32029 | MODERATE | ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation |
CVE-2025-32029 at a Glance
How to Fix CVE-2025-32029
To remediate this vulnerability, upgrade all affected @apeleghq/asn1 der dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @apeleghq/asn1-der@1.0.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @apeleghq/asn1-der
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-32029, inspect your project dependencies using npm:
npm ls @apeleghq/asn1-der
Analyze the terminal output to locate any version of @apeleghq/asn1 der in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.4), your application is affected.
Note: The npm ls @apeleghq/asn1-der command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In @apeleghq/asn1 der, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-32029 Affected @apeleghq/asn1 der Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@apeleghq/asn1-der
|
npm |
< 1.0.4
|
1.0.4
|
References
Frequently Asked Questions
What is CVE-2025-32029?
Which @apeleghq/asn1 der versions are affected?
What version fixes CVE-2025-32029?
Is @apeleghq/asn1-der affected?
What CWE is associated with CVE-2025-32029?
How can I check npm dependencies for CVE-2025-32029?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p4qw-7j9g-5h53",
"modified" : "2025-04-08T17:49:39Z",
"published" : "2025-04-07T21:11:19Z",
"aliases" : [ "CVE-2025-32029" ],
"summary" : "ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation",
"details" : "### Impact\n\nIncorrect `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.\n\nIn addition, `number` encoding had a few other issues that resulted it in it not encoding values correctly.\n\n### Patches\n\nThe issue is patched in version `1.0.4`. Users are recommended to upgrade as soon as possible.\n\n### Workarounds\n\nIf 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`. Although `Asn1Integer` supports `bigint` inputs, some additional implementation issues make using `bigint` as a mitigation inviable, as it will result in incorrect values.\n\nIf upgrading is not an option and range checks are impractical or undesirable, input to `Asn1Integer` can be provided as a buffer to be used directly. Note that this requires computing the correct DER encoding externally.\n\n### References\n\nN/A",
"severity" : [ {
"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" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@apeleghq/asn1-der"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ApelegHQ/ts-asn1-der/security/advisories/GHSA-p4qw-7j9g-5h53"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-32029"
}, {
"type" : "WEB",
"url" : "https://github.com/ApelegHQ/ts-asn1-der/commit/b2bc9032cbe19755d234a27d79e47a7e52993af8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ApelegHQ/ts-asn1-der"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1335", "CWE-835" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-04-07T21:11:19Z",
"nvd_published_at" : "2025-04-07T21:15:42Z"
}
}