CVE-2025-12816: node-forge ASN.1 Validator Desynchronization Vulnerability

node-forge Updated 27 Nov 2025

Summary

26/11/2025
Yes i
High
8.6

CVE-2025-12816: node-forge has an Interpretation Conflict vulnerability via its ASN.1 Validator Desynchronization. Affects node-forge versions < 1.3.2. Fixed in 1.3.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

node-forge is a popular JavaScript library that provides tools for working with cryptographic protocols and data formats, including X.509 certificates, PKCS#7, PKCS#12, and more. It is widely used in web applications for secure data handling. However, certain versions of node-forge are vulnerable to an Interpretation Conflict vulnerability that can lead to serious security issues.

Vulnerability Detail

CVE-2025-12816 is an Interpretation Conflict (CWE-436) vulnerability found in node-forge versions 1.3.1 and below. This vulnerability allows remote, unauthenticated attackers to craft ASN.1 structures that desynchronize schema validations. As a result, it can bypass critical cryptographic verifications and security decisions, leading to potential integrity and confidentiality compromises. The flaw exists in the asn1.validate function, where a specially crafted ASN.1 object can cause a malformed optional field to be misinterpreted as a mandatory structure, allowing attackers to manipulate digital signatures and integrity checks.

How To Fix

Latest published version: 1.4.0 as of 22 Oct 2026

npm install node-forge@1.4.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.2

This is the first release that contains the fix.

npm install node-forge@1.3.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If an immediate update is not possible, consider implementing additional validation checks in your application to ensure that ASN.1 structures conform to expected formats before processing them. However, this is not a complete substitute for updating the library.

Conclusion

CVE-2025-12816 represents a significant security risk for applications using vulnerable versions of node-forge. It is crucial to update to version 1.3.2 or later to mitigate this risk. Additionally, employing Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for node-forge →

Share this vulnerability

FAQ

CVE-2025-12816 is a vulnerability in the node-forge library that allows attackers to exploit ASN.1 validation processes, potentially bypassing security checks.

Versions 1.3.1 and below of node-forge are affected by this vulnerability.

The vulnerability can lead to integrity and confidentiality issues, allowing attackers to manipulate cryptographic signatures and bypass security measures.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of CVE-2025-12816 is 8.6, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for node-forge.

How To Fix

Latest published version: 1.4.0 as of 22 Oct 2026

npm install node-forge@1.4.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.2

This is the first release that contains the fix.

npm install node-forge@1.3.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback