JWT forgery via attacker-selected verification algorithm
Published Nov 17, 2023 · Updated Jun 8, 2026
Algorithm confusion in Joaquim Serafim json-web-token before 4.0.0 allows remote attackers to forge accepted JWT payloads. The decode path trusts the unverified header.alg value, treating an RSA public key as an HMAC secret when a token declares HS256. Exploitation requires an application configured for RS256 and access to its public key; successful tokens can supply arbitrary claims that the application accepts.
Summary
What happened
Algorithm confusion in Joaquim Serafim json-web-token before 4.0.0 allows remote attackers to forge accepted JWT payloads. The decode path trusts the unverified header.alg value, treating an RSA public key as an HMAC secret when a token declares HS256. Exploitation requires an application configured for RS256 and access to its public key; successful tokens can supply arbitrary claims that the application accepts.
The record
- CVE
- CVE-2023-48238
- Published
- Nov 17, 2023
- Updated
- Jun 8, 2026
- Vendor
- Joaquim Serafim
- Product
- json-web-token
- Classifications
- CWE-345
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Nov 17, 2023CVE publishedPublication date reported by the CVE source.
- Jun 8, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 4.0.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- GHSA-4xw9-cx39-r355 proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo