/

CVE-2026-33894

Severity:

HIGH RISK

(7.5)

Improper Cryptographic Signature Verification

CVE-2026-33894

Modified

Vulnerability type

Category:

Improper Cryptographic Signature Verification

CWE:

CWE-20, CWE-347

Impact:

Signature Forgery and Authentication Bypass

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

node-forge's implementation of RSASSA PKCS#1 v1.5 signature verification for low public exponent RSA keys (e=3) can accept forged signatures due to insufficient ASN.1 structure and padding validation.

By injecting garbage bytes into the ASN.1 structure and exploiting missing checks on minimum padding length, an attacker can construct Bleichenbacher-style forgeries that pass signature verification under certain key conditions.

Affected context

This vulnerability affects applications that rely on node-forge's RSASSA PKCS#1 v1.5 verification, particularly in TLS or custom authentication flows using RSA keys with a low public exponent (commonly e=3).

It is most relevant where node-forge is treated as a trust anchor for validating certificates, tokens, or other signed data and where the application assumes that a successful verification equates to authenticity and integrity without additional defense-in-depth checks.

The risk increases when high-value security decisions (e.g., user authentication, certificate trust, or privileged actions) depend solely on node-forge's signature validation outcome.

Exploit preconditions

  • Attack surface: Any API or protocol handler that uses node-forge to verify RSASSA PKCS#1 v1.5 signatures (e.g., TLS handshakes, certificate verification, signed messages or tokens).
  • Required access: Ability to supply or influence untrusted signatures or signed objects that the application validates with node-forge.
  • Key conditions: Use of RSA public keys with low public exponent values (notably e=3) for the affected signatures.
  • Trigger point: Invocation of node-forge's PKCS#1 v1.5 verification routine during normal validation of signatures.
  • Why exploitation is possible: The implementation permits extra bytes in the ASN.1 structure and does not enforce the minimum of 8 bytes of padding, breaking the strict PKCS#1 v1.5 formatting rules and enabling Bleichenbacher-style construction of signatures that mathematically verify but do not correspond to a legitimately generated signature.

Why this happens

The core issue is an improper validation of cryptographic signatures, aligning with CWE-347 and supported by inadequate input validation (CWE-20).

In PKCS#1 v1.5, a valid RSA signature must conform to a strict byte-level structure: a specific padding scheme (00 01 FF ... FF 00), a minimum padding length, and a correctly encoded ASN.1 DigestInfo field with no extraneous data.

The affected node-forge implementation:

  • Accepts ASN.1 structures with additional unexpected bytes inserted in a field within the ASN.1 DigestInfo, and
  • Fails to enforce the requirement for at least 8 bytes of 0xFF padding.

This lax structural and padding validation allows attackers, especially when the public exponent is low (e=3), to craft signature values that satisfy the RSA verification operation without matching a valid PKCS#1 v1.5 formatted block.

Conceptually, this is a classic Bleichenbacher-style forgery: the cryptographic primitive is correct, but the higher-level encoding and semantic checks are incomplete, weakening the security guarantees of the signature scheme.

Potential impact

  • Attackers could forge signatures that node-forge accepts as valid, undermining the authenticity of data or identities.
  • TLS-like handshakes or certificate validation flows may be bypassed, potentially enabling man-in-the-middle or server impersonation in custom deployments that rely on node-forge.
  • Applications that use node-forge to verify signed tokens, messages, or configuration files could accept maliciously crafted objects as trusted.
  • Audit trails, logs, or transactions that depend on signature validation may be spoofed, weakening non-repudiation and trust assumptions.
  • Downstream systems that rely on node-forge-based validation could be indirectly exposed to privilege escalation or policy bypass.

General mitigation guidance

Effective mitigation focuses on enforcing strict PKCS#1 v1.5 conformance and strengthening how cryptographic verification is integrated into the application:

  • Prefer cryptographic libraries and verification modes that rigorously validate PKCS#1 v1.5 structure, enforcing:
  • Correct padding format (00 01 FF ... FF 00),
  • A minimum of 8 bytes of 0xFF padding,
  • Exact ASN.1 DigestInfo encoding without extra or malformed fields.
  • Where possible, favor more modern signature schemes (e.g., RSASSA-PSS or elliptic-curve signatures) and use standardized, well-vetted verification utilities provided by widely reviewed crypto toolkits.
  • Treat all signature inputs as untrusted; design verification logic so that any structural anomaly or deviation from spec is treated as a hard failure, not a soft accept.
  • Apply defense in depth for security-sensitive decisions:
  • Couple signature validation with additional checks such as certificate chain validation, key pinning, or audience/nonce checks for higher-level protocols.
  • Avoid custom parsing or partial verification shortcuts around cryptographic primitives.
  • Ensure that key management policies discourage unnecessary use of low exponents; prefer common secure exponents (e.g., 65537) along with appropriate key sizes and generation practices.

How teams detect issues like this

Detection typically involves both code-focused and behavior-focused approaches:

  • Static analysis and code review:
  • Identify all call sites where node-forge is used for RSA PKCS#1 v1.5 signature verification, especially in TLS, certificate, or token-handling code.
  • Verify that application logic does not override or bypass strict verification results (e.g., accepts "weak" or partially validated signatures).
  • Flag custom ASN.1 parsing layers built on top of node-forge that might relax structural checks or suppress errors.
  • Security testing and fuzzing:
  • Use protocol-aware fuzzers or crypto-specific test suites to feed malformed signatures with extra ASN.1 bytes or reduced padding and confirm they are rejected.
  • Create regression tests for known forgery patterns (e.g., variants akin to CVE-2022-24771 and this issue) to ensure future changes do not reintroduce lenient behavior.
  • Runtime monitoring and policy enforcement:
  • Instrument sensitive verification paths to log anomalous validation events (e.g., unusually high rate of signature failures or unexpected key parameters such as e=3).
  • Integrate automated code scanning tools that include cryptographic misuse rules, focusing on PKCS#1 v1.5 verification and low-exponent RSA usage.

These strategies help organizations both identify current exposure and guard against similar verification flaws over time.

Sources

SourceLink
datatracker.ietf.orgdatatracker.ietf.org/doc/html/rfc2313#section-8
github.comgithub.com/digitalbazaar/forge/security/advisories/GHSA-ppp5-5v6c-4jwp
mailarchive.ietf.orgmailarchive.ietf.org/arch/msg/openpgp/5rnE9ZRN1AokBVj3VqblGlP63QE
rfc-editor.orgrfc-editor.org/rfc/rfc8017.html
access.redhat.comaccess.redhat.com/errata/RHSA-2026:13826
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19375
access.redhat.comaccess.redhat.com/errata/RHSA-2026:21017
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22465
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22629
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22840
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23361
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24761
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24853
access.redhat.comaccess.redhat.com/errata/RHSA-2026:34342
access.redhat.comaccess.redhat.com/errata/RHSA-2026:9742
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-33894
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2452464
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33894.json

Frequently asked

questions

Exploitability depends on whether your application uses node-forge's RSASSA PKCS#1 v1.5 verification with low-exponent RSA keys and treats a successful verification as a high-trust event (such as authenticating a server, user, or configuration). Where those conditions hold, an attacker who can supply arbitrary signatures or signed artifacts may be able to forge signatures.

Not necessarily. The primary requirement is the ability to present or control data that your service verifies with node-forge—this could be over a network (e.g., client-supplied tokens, certificates, or signed messages) or via any input channel where signatures are checked. No local system privileges are inherently required, only the capability to feed crafted signatures into the verification path.

The safest pattern is to rely on a strict, specification-compliant verification implementation that enforces correct PKCS#1 v1.5 formatting, including full padding and ASN.1 checks, and to migrate security-critical paths toward modern, robust signature schemes where feasible. Additionally, avoid custom relaxations or overrides of library verification logic and ensure key parameters follow current best practices.

Prevention centers on using well-reviewed, standards-focused cryptographic libraries; enabling their strict verification modes; and avoiding custom cryptographic code or shortcuts. Combine this with secure development practices—threat modeling for crypto-dependent features, mandatory security reviews for cryptographic changes, automated tests using known attack vectors, and CI-integrated static analysis tuned to identify misuse of signature verification APIs and dangerous key configurations.

Find out what's already
exploitable in your codebase.