react-native-pure-jwt alg:none Bypass (CVE-2026-138378)
TL;DR · the short version
react-native-pure-jwt, a React Native library for decoding and verifying JSON Web Tokens, had a critical flaw on Android, CVE-2026-138378: its decode() accepted a token with the header "alg": "none" and an empty signature and returned the claims, so a person without the secret could forge claims such as role: "admin". The maintainer's advisory GHSA-5g2r-g3v9-9pc5 rates it Critical (CVSS 3.1 9.1, CWE-347) and lists versions before 3.1.1 as affected and 3.1.1 as the fix. iOS is not affected. The cause was a call to the JJWT 0.9.0 parse() method, which checks a signature only when one is present; the fix switches it to parseClaimsJws(). No source we read reports exploitation.
CVE-2026-138378 is a critical flaw in react-native-pure-jwt, a React Native library for decoding and verifying JSON Web Tokens (JWTs). On Android, versions before 3.1.1 accepted a token whose header said "alg": "none" with an empty signature and handed back its claims as if they were valid. Anyone who could send a token could forge claims such as a user ID or role: "admin". The maintainer fixed it in 3.1.1. iOS is not affected.
Who this is for: mobile and app security teams, developers of React Native apps, and anyone whose backend trusts a token that the app decoded.
Based on the maintainer's advisory GHSA-5g2r-g3v9-9pc5 and the GitHub Advisory Database record for CVE-2026-138378, read on 30 November 2026. The CVE.org, NVD and npm pages did not load when we checked, so we did not use them. PlayCISO is not affiliated with the project.
Confirmed vs not yet known
Stated by the maintainer: Android decode() accepted unsigned alg: none tokens before 3.1.1; Critical, CVSS 3.1 9.1 (CWE-347); fixed in 3.1.1; iOS rejects such tokens; no workaround inside the library.
Stated by the advisory database: the same flaw as CVE-2026-138378, published 29 November 2026 with a CVSS 4.0 score of 9.1 (the record is labelled unreviewed and lists affected and patched versions as unknown).
Not stated: any exploitation in the wild, which apps use the vulnerable library or how many, and a single agreed date (the release page says 28 November, the database 29 November and the maintainer's advisory 30 November).
How the bug works
A JWT has three parts: a header (which names the signing algorithm), a payload of claims, and a signature. The header can say none, meaning "unsigned". A library that trusts the header will happily accept a token an attacker typed by hand. RFC 8725, the JWT best-practices document, tells implementations to reject none unless it is explicitly expected.
In this library the Android code called the JJWT 0.9.0 parse() method, which checks a signature only if one is present. So decode(token, secret, options) returned the claims of a token with an empty signature. The fix commit changes one line to parseClaimsJws(), which rejects unsigned tokens. The maintainer notes that skipValidation: true still returns claims with no signature check on both platforms; that is documented behaviour and is unchanged.
Why this matters even though it is a client library
This runs inside the app. It becomes dangerous when the app, or a backend built around the app, treats a locally decoded token as proof of who someone is or what they may do. The advisory's own worst case is claim forgery such as role: "admin". A server that verifies signatures itself is not weakened by this library bug. The practical question for each app: does anything important depend on the result of a token that was decoded on the device?
Useful next, if this was relevant to you
Timeline
| Date | Event | Source |
|---|---|---|
| 28 November 2026 | Version 3.1.1 release date shown on the project's release page | GitHub releases |
| 29 November 2026 | CVE-2026-138378 published to the GitHub Advisory Database (NVD source), CVSS 4.0 9.1 | GitHub Advisory Database |
| 30 November 2026 | Maintainer's advisory GHSA-5g2r-g3v9-9pc5 published, Critical, CVSS 3.1 9.1 | Maintainer advisory |
The reporter is credited in the release notes as Vishal Suwalka. Scoring differs between records (CVSS 3.1 for the maintainer, CVSS 4.0 with a higher attack complexity for the database); both give 9.1.
What to do this week
- Find it. Search every React Native app and its lockfiles for
react-native-pure-jwt, including old versions still on users' phones. Our repo dependency exposure check can scan a public repo or a pasted lockfile in your browser. - Upgrade to 3.1.1 or later and ship a new app release. Plan for users who do not update.
- Do not decide access on the device. Verify the token signature and claims on your server, with the algorithm pinned to the one you issue (for example RS256 or HS256), and reject
none. - Check your logs for tokens with an
algofnoneor an empty signature, and for sudden role changes in claims. - Search for the pattern. If one library accepted
alg: none, check the others you use. Practise on the JWT lab and inspect tokens with the JWT decoder.
Frequently asked questions
What is CVE-2026-138378?
A signature verification bypass in react-native-pure-jwt, a React Native library for decoding and verifying JSON Web Tokens. On Android, the library's decode() function accepted a token whose header said "alg": "none" with an empty signature and returned its claims as if they were valid. The maintainer's advisory (GHSA-5g2r-g3v9-9pc5) rates it Critical, CVSS 3.1 score 9.1, CWE-347.
Which versions are affected and which fix it?
Versions before 3.1.1 on Android. Version 3.1.1 fixes it. iOS is not affected, according to the maintainer: the iOS module already rejected such tokens with "Algorithm doesn't match name in header."
How does the bug work?
The Android module called the JJWT 0.9.0 parse() method, which only checks a signature if one is present. An attacker with no secret could send an unsigned token with a forged claim such as role: "admin" and decode() would resolve with it. The fix, commit 5c0d869, changes that one line to parseClaimsJws(), which rejects unsigned tokens.
Is there a workaround?
The advisory says no workaround exists inside the library. Verify tokens on your server and do not trust decode() results on Android until you update. Note that skipValidation: true still returns claims without a signature check on both platforms; that is documented and unchanged.
Is CVE-2026-138378 being exploited?
No source we read says so. We did not find it described as exploited in the wild, and we did not check CISA KEV directly. The risk is to apps that trust the result of decode() on Android to make an access decision.
Does this mean a real server accepted forged tokens?
Not by itself. The flaw is in a client-side library: it matters when an app, or a backend written to rely on the app, treats a locally decoded token as proof of identity or role. A server that verifies signatures itself is not affected by this library bug.
What should app teams do?
Find the library in every React Native app (including old releases still in use), upgrade to 3.1.1 or later, pin the expected algorithm everywhere you verify a token, never make authorisation decisions on a token decoded on the device, and check logs for tokens with alg none.
Sources
- react-native-pure-jwt: GHSA-5g2r-g3v9-9pc5, Android decode() accepts unsigned tokens (alg: none), the primary source
- GitHub Advisory Database: GHSA-4cf9-9v89-p9v5 (CVE-2026-138378)
- Fix commit 5c0d869: Reject unsigned tokens in Android decode and the v3.1.1 release
- VulnCheck advisory (listed as a reference by the advisory database; we did not read it)
- RFC 8725: JSON Web Token Best Current Practices
This article is educational guidance for security leaders. Check the project's advisory for updates.
Spotted an error? Report an error. A person reads every message.