Skip to main content

SJCL CVE-2026-4258

| EUVDEUVD-2026-12542 HIGH
Improper Verification of Cryptographic Signature (CWE-347)
2026-03-17 snyk GHSA-2w8x-224x-785m
7.7
CVSS 4.0 · Vendor: snyk
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify service using SJCL ECDH
  2. Delivery
    Craft off-curve points in small subgroups
  3. Exploit
    Submit malicious public keys to ECDH endpoint
  4. Install
    Observe raw x-coordinate oracle responses
  5. C2
    Solve discrete log in each small subgroup
  6. Execute
    CRT-combine to recover private scalar
  7. Impact
    Impersonate victim or decrypt captured traffic

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
Exploitation Conditions

The target application must (1) be using SJCL prior to 1.0.9, (2) invoke sjcl.ecc.basicKey.publicKey() on attacker-controlled (x,y) coordinates - typically a server-side ECDH key-agreement, JWE decryption, or signature-verification flow that ingests a peer public key from the network, and (3) expose an observable signal of the resulting ECDH shared secret (e.g. dhJavaEc()'s raw x-coordinate is returned, used as a symmetric key whose ciphertext is observable, or echoed in a JWT/JWE error message). The 'Jwt Attack' tag indicates JOSE/JWE consumers that accept attacker-chosen ephemeral keys are a primary attack surface. Limiting factors: SJCL deployments that use only symmetric crypto (AES, SHA, HMAC) are not exposed; client-only SJCL usage where the user's private key never processes attacker-supplied peer keys is not exposed; exploitation requires hundreds to thousands of oracle queries against the same victim private key, so short-lived ephemeral keys (true ECDHE with fresh keys per session) substantially reduce feasibility; the victim must reuse a long-term ECDH private key across queries for full recovery.

Impact

Signals are mixed and require careful interpretation. CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N/VC:H scores 7.7 and reflects unauthenticated network-reachable confidentiality loss with no integrity or availability impact - accurate for a private-key oracle. The E:P (Proof-of-Concept) threat metric aligns with the public Kr0emer gist, so publicly available exploit code exists. EPSS is very low (0.02%, 5th percentile) and the CVE is not on CISA KEV, indicating no observed mass exploitation; this fits the profile of a niche cryptographic flaw requiring a specific deployment (a server-side SJCL endpoint that performs ECDH against attacker-supplied public keys and reveals or uses the shared secret in an observable way). Real-world priority is moderate-to-high for any service still using SJCL for ECDH key exchange - full key compromise is catastrophic where it applies - but low for the many SJCL deployments that only use symmetric primitives. Note: the CVSS AV:N/PR:N rating assumes a typical server-side ECDH oracle pattern; purely client-side SJCL use does not match the attack model, so blanket application of the 7.7 score may overstate risk for some integrations.

Exploit ScenarioDerived

A web or API service uses SJCL server-side to perform ECDH against a client-supplied public key - for example to derive a session key, decrypt a JWE, or implement an end-to-end-encrypted messaging handshake - and either returns the derived value or uses it in a way the attacker can observe. The attacker submits a sequence of crafted off-curve points lying in small subgroups, each ECDH response leaks the victim's private key modulo a small prime, and after a few hundred queries the attacker reconstructs the full private scalar via CRT and can impersonate the victim or decrypt past traffic. A public PoC by Kr0emer is available as a GitHub gist, lowering the engineering effort required.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 03, 2026

Private key recovery in Stanford JavaScript Crypto Library (SJCL) ECDH implementation affects all versions prior to 1.0.9, allowing remote unauthenticated attackers to extract a victim's ECDH private key by submitting crafted off-curve public keys and observing the resulting shared-secret outputs. The flaw stems from missing point-on-curve validation in sjcl.ecc.basicKey.publicKey(), combined with dhJavaEc() returning the raw x-coordinate without hashing - providing a direct plaintext oracle. Publicly available exploit code exists (PoC gist by Kr0emer); EPSS is low at 0.02% despite the high confidentiality impact, suggesting limited current opportunistic targeting.

Earlier versions of this analysis (2)
v2 Jun 03, 2026 - 14:58 cvss changed CVSS 7.7

Private key recovery in Stanford JavaScript Crypto Library (SJCL) versions prior to 1.0.9 allows remote attackers to extract a victim's ECDH private key by submitting maliciously crafted off-curve public keys and observing the resulting ECDH shared-secret outputs. The dhJavaEc() function exposes the raw x-coordinate of the scalar multiplication without hashing, creating a direct plaintext invalid-curve oracle. No CISA KEV listing and EPSS is very low (0.02%), but publicly available exploit material (Kr0emer gist) and a vendor-confirmed fix in 1.0.9 elevate this to a meaningful confidentiality risk for any system still relying on SJCL ECDH.

v1 Mar 17, 2026 - 08:13 CVSS 7.5

A cryptographic vulnerability in the Stanford Javascript Crypto Library (SJCL) allows attackers to recover victims' ECDH private keys through a missing point-on-curve validation flaw. The vulnerability affects all versions of SJCL and enables remote attackers to send specially crafted off-curve public keys and observe ECDH outputs to extract private key material. A proof-of-concept exploit is publicly available, though the vulnerability is not currently listed in CISA KEV and has no EPSS score assigned yet.

RemediationAI

Vendor-released patch: SJCL 1.0.9 - upgrade the npm 'sjcl' dependency to 1.0.9 or later, which adds a this._point.isValid() check in sjcl.ecc.basicKey.publicKey() that throws sjcl.exception.corrupt('not on the curve!') for off-curve inputs (commit ee30745). Because the maintainer has formally deprecated SJCL, the strongly preferred long-term remediation is to migrate ECDH and other crypto operations to an actively maintained library such as the Web Crypto API (SubtleCrypto), Node.js built-in crypto, or libsodium/noble-curves; this avoids future unpatched issues since SJCL receives no other maintenance. If immediate upgrade is not possible, compensating controls include: validating every external public key against the curve equation before passing it to sjcl.ecc.basicKey.publicKey() (trade-off: requires correct curve math in application code); refusing to perform ECDH with externally supplied keys on the server side (trade-off: breaks any protocol that needs ephemeral peer keys); rate-limiting and logging ECDH endpoints to detect the many oracle queries required (trade-off: detection only, not prevention); and replacing dhJavaEc() raw-x output with an HKDF/SHA-256 derivation so the shared secret is no longer a plaintext oracle (trade-off: breaks interoperability with peers expecting raw output). See https://security.snyk.io/vuln/SNYK-JS-SJCL-15369617 and the upstream advisory in the SJCL README.

Affected VersionsENISA

sjcl 0 <*

Affected Packages

npm sjcl fix: 1.0.9

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SJCL (Stanford JavaScript Crypto Library, CPE cpe:2.3:a:n/a:sjcl) is a long-standing but deprecated JavaScript cryptography library historically used in browser and Node.js applications for ECDH, AES, and other primitives. The vulnerability is a classic invalid-curve attack: the library's sjcl.ecc.basicKey.publicKey() constructor accepted arbitrary (x,y) coordinates without verifying they lie on the configured elliptic curve, so an attacker could supply a point on a weaker curve whose order has small prime factors. CWE-347 (Improper Verification of Cryptographic Signature) captures the broader 'failure to validate cryptographic input' class - here applied to ECC point validation. Because dhJavaEc() returns the raw x-coordinate of k·P with no KDF/hash, each ECDH operation leaks the victim's private key modulo a small subgroup; repeated queries with carefully chosen malicious points allow CRT-style reconstruction of the full private scalar.

Know when Sjcl gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (snyk) PRIMARY 7.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P

Primary rating from Vendor (snyk) · only source for this CVE.

CVSS VectorVendor: snyk

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

5
Analysis Updated
Jun 03, 2026 - 14:58 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 03, 2026 - 14:58 vuln.today
v2 - CVSS changed
CVSS changed
Jun 03, 2026 - 14:52 NVD
7.5 (HIGH) 7.7 (HIGH)
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Mar 17, 2026 - 05:00 nvd
HIGH 7.5

DescriptionCVE.org

All versions of the package sjcl are vulnerable to Improper Verification of Cryptographic Signature due to missing point-on-curve validation in sjcl.ecc.basicKey.publicKey(). An attacker can recover a victim's ECDH private key by sending crafted off-curve public keys and observing ECDH outputs. The dhJavaEc() function directly returns the raw x-coordinate of the scalar multiplication result (no hashing), providing a plaintext oracle without requiring any decryption feedback.

Executive ViewAI

Why It Matters

Stanford JavaScript Crypto Library (SJCL) versions below 1.0.9 enable remote private key extraction through ECDH exploitation without requiring authentication. Organizations using SJCL for JavaScript cryptographic operations face direct risk of key compromise, potentially affecting the confidentiality of encrypted communications and the authenticity of digitally signed content.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% exploitable
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

Debian

Bug #924588
node-sjcl
Release Status Fixed Version Urgency
open - -

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy