Skip to main content

CVE-2026-29000: Forging pac4j-jwt Logins With Only the Public Key

· 9 min read
Ankush K
Co-founder and CTO, Dwaar
CVE-2026-29000: Forging pac4j-jwt Logins With Only the Public Key

A 10.0 just landed on a Java authentication library, and the question on your desk is whether it applies to you. The score cannot answer that. Reachability depends on how you built one object in your code, and the upstream advisory does not say which way of building it is dangerous.

CVECVE-2026-29000 (GHSA-pm7g-w2cf-q238), CWE-347
AffectedMaven org.pac4j:pac4j-jwt below 4.5.9, from 5.0.0-RC1 to below 5.7.9, from 6.0.4.1 to below 6.3.3 (GitHub's ranges)
Fixed in4.5.9, 5.7.9, 6.3.3
SeverityCritical, 10.0 on CVSS 4.0, assigned by the CVE assigner in the CVE record on 4 March. GitHub lists the same vector and score. NVD has not scored it itself; its record carries the assigner's vectors
Exploited as of 2026-03-06No exploitation reported in the sources cited here. Not in CISA KEV as of its 5 March release. CISA's SSVC assessment lists exploitation as proof of concept
Disclosed6.3.3 and 5.7.9 tagged 2 March 2026, pac4j advisory committed 2 March, credit added 3 March, finders' writeup dated 3 March, CVE record and NVD 4 March, GitHub 5 March

What went wrong​

GitHub's advisory has the short version: an attacker holding the server's RSA public key can build a JWE-wrapped PlainJWT with arbitrary subject and role claims, and JwtAuthenticator accepts it. pac4j's advisory credits the researchers who found it and shares no further detail. The detail is in the public fix commit and the finders' writeup, which GitHub's advisory lists in its references.

If a top-level token is a PlainJWT and signature configurations exist, validate() rejects it. The encrypted path is where that check goes missing. After decrypting, the 6.3.2 source unwraps the payload like this:

signedJWT = encryptedJWT.getPayload().toSignedJWT();
if (signedJWT != null) { jwt = signedJWT; }

pac4j 6.3.2 pins nimbus-jose-jwt 10.7, where toSignedJWT() returns null when the payload cannot be converted to a signed JWT, as with a PlainJWT. The verification step then keys off the same variable:

// Illustration, condensed from the same method. Not verbatim.
if (signedJWT != null) {
// verify against signatureConfigurations
}

The signature block is skipped, so nothing in it can reject the token. createJwtProfile() then reads claims from the decrypted token through getJWTClaimsSet(), so when the payload parses as a JSON claims set, a profile gets built from claims the attacker wrote. A payload that does not parse fails at that step with "Cannot decrypt / verify JWT". That is my reading of the source, not a lab result. It is narrower than the advisory's "JWE-wrapped PlainJWT" wording, and I would not use it to argue the bypass away.

The public key is enough because, in RSA-based JWE, the server's public key is the encryption key. Anyone holding it can produce a token the server decrypts successfully. Encryption gives you confidentiality. The signature was the only authenticity check, and it was the part that got skipped.

The 6.3.3 source moves the decision to the configuration. If signature configurations exist and signedJWT is null, it throws a CredentialsException reading "A non-signed JWT cannot be accepted as signature configurations have been defined". The rule for any verifier: what the server requires decides whether to verify, never what the token turned out to be. Only the 6.3.3 change was checked for this post, not 5.7.9 or 4.5.9.

Who is exposed​

pac4j does not describe preconditions. What follows is my reading of the code, not a statement from the project. The first row matches the conditions the finders published in their 3 March writeup, listed in the references of GitHub's advisory: JWE rather than only JWS, RSA-based encryption, both encryption and signature configurations, and authentication through JwtAuthenticator.

How JwtAuthenticator is configuredWhat happens to an unsigned token
RSA encryption and signature configurationsThis bug. Below the fixed versions, an unsigned token inside a JWE skips verification
Signature configurations, no encryptionThe JWE path is not reachable, and a bare PlainJWT is rejected
Encryption, no signature configurationsNot this bug, but accepted by design: "JWT is not signed and no signature configurations -> verified". That line is in 6.3.3 too, so upgrading does not change it

Use that table to set your order of work, not to skip the upgrade. pac4j's wording is "To stay safe, you MUST upgrade", with no carve-outs, and a known bad version is one configuration change away from being exposed.

On exploitation, the 5 March release of CISA's KEV catalog has no entry, and CISA's SSVC assessment in the 5 March CVE record lists exploitation as proof of concept. With the fix diff public and the advisory text spelling out the technique, I would not plan around this staying quiet.

What to do now​

  1. Find it in resolved dependency trees, direct and transitive. It can arrive through a library your build file never names.
  2. Upgrade. Move 4.x to 4.5.9 or newer, 5.x to 5.7.9 or newer, 6.x to 6.3.3 or newer. pac4j, GitHub and NVD give no workaround. If it is transitive, force the version with a Maven dependencyManagement entry or a Gradle constraint. That is general build practice, not project guidance.
  3. Do not trust a narrow range. GitHub starts the 6.x range at 6.0.4.1; the CNA ranges in the CVE record start at 6.0, 5.0 and 4.0. Where they disagree, treat the version as affected.
  4. Find every place JwtAuthenticator is built. Anything with both RSA encryption and signature configurations, reachable by people you do not trust, goes first.
  5. Decide what to do about tokens accepted before the upgrade. None of the sources cited here gives detection guidance or indicators, and from the code, a forged login that succeeds on a vulnerable version raises nothing. My advice, not the project's: if you cannot rule out forged tokens on an exposed service, treat those sessions as untrusted. Rotating the RSA key pair does not close this, because the new public key is no more secret than the old one.
  6. Watch for that CredentialsException message after upgrading. My inference from the source: a spike suggests someone is trying the forgery.

What the 10.0 cannot tell you​

A base score describes the flaw. Exposure is a property of your deployment. The metrics in the CVE record say network attack, low complexity, no privileges, no user interaction. They say nothing about which row of that table you are in.

Two services with the same jar and the same 10.0 can carry different risk, so severity alone can send you to the wrong one first. Reachability orders the work. It does not cancel it.

The preconditions for this bug are not in pac4j's advisory or in the score. You have to read them in the fix diff or in the finders' writeup listed in GitHub's advisory references. A version match can tell you the jar is present. It cannot tell you what you decided when you constructed the authenticator, which is part of why scanning alone is not a security program.

Take this CVE and two other critical findings, and answer three questions for each: does it ship, does our configuration reach the flawed code, and who can reach that service. Any question you cannot answer today shows you where your triage is guessing.

References​