Skip to content

fix(security): Upgrade pac4j-jwt to 4.5.9 (CVE-2026-29000)#2496

Open
abhu85 wants to merge 1 commit intoOHDSI:masterfrom
abhu85:fix/cve-2026-29000-pac4j-jwt
Open

fix(security): Upgrade pac4j-jwt to 4.5.9 (CVE-2026-29000)#2496
abhu85 wants to merge 1 commit intoOHDSI:masterfrom
abhu85:fix/cve-2026-29000-pac4j-jwt

Conversation

@abhu85
Copy link
Copy Markdown

@abhu85 abhu85 commented Mar 14, 2026

Summary

This PR upgrades pac4j from version 4.0.0 to 4.5.9 to address CVE-2026-29000, a critical authentication bypass vulnerability.

Vulnerability Details

Field Value
CVE CVE-2026-29000
CVSS Score 9.1 (Critical)
Affected Component pac4j-jwt JwtAuthenticator
CWE CWE-347 (Improper Verification of Cryptographic Signature)
Fixed In pac4j 4.5.9+, 5.7.9+, 6.3.3+

Description

The vulnerability in pac4j-jwt allows remote attackers to forge authentication tokens. An attacker with access to the server's RSA public key can create a JWE-wrapped PlainJWT with arbitrary subject and role claims, bypassing signature verification to authenticate as any user, including administrators.

Impact

Given that WebAPI is a healthcare research platform handling sensitive patient data and cohort definitions, this authentication bypass vulnerability poses a significant risk. Attackers could potentially:

  • Access sensitive healthcare data without authorization
  • Modify cohort definitions and study parameters
  • Impersonate administrators to gain full system control

Changes

  • Updated pac4j.version property from 4.0.0 to 4.5.9 in pom.xml
  • This affects all pac4j modules (pac4j-oauth, pac4j-oidc, pac4j-http, pac4j-saml-opensamlv3, pac4j-cas) used by WebAPI

Testing

  • Dependencies resolve successfully with the new version
  • CI builds pass (to be verified)
  • Authentication flows work correctly (requires manual testing in staging environment)

References

Upgrade pac4j from 4.0.0 to 4.5.9 to address CVE-2026-29000, a critical
authentication bypass vulnerability (CVSS 9.1) in pac4j-jwt.

The vulnerability allows attackers with access to the server's RSA public
key to forge authentication tokens by wrapping a PlainJWT in JWE,
effectively bypassing signature verification and authenticating as any
user, including administrators.

This is particularly critical for healthcare applications like WebAPI
that handle sensitive patient data.

Reference: https://nvd.nist.gov/vuln/detail/CVE-2026-29000
@abhu85 abhu85 force-pushed the fix/cve-2026-29000-pac4j-jwt branch from 768e5e5 to 49c6f13 Compare March 14, 2026 21:40
@CyloNox
Copy link
Copy Markdown

CyloNox commented Apr 7, 2026

The last time this was upgraded it broke authentication. So definitely need to be cautious on upgrading this one.

Here is the hotfix that restored it: https://github.com/OHDSI/WebAPI/pull/2454/changes

@abhu85
Copy link
Copy Markdown
Author

abhu85 commented Apr 7, 2026

Thanks for the heads up @CyloNox - I looked into this.

Good news: buji-pac4j 5.0.1's pom.xml declares compatibility with pac4j [4.0, 5.0), so 4.5.9 should work from a dependency perspective.

The previous breakage with 4.5.5 was likely due to runtime behavioral changes in pac4j, not a hard dependency conflict. Looking at the pac4j 4.x changelog, there were some breaking changes in profile handling and session management between minor versions.

To mitigate risk, I can:

  1. Review WebAPI's OAuth/OIDC/CAS filter implementations for any pac4j API usage that changed between 4.0.0 and 4.5.9
  2. Add integration tests if there's a test environment available
  3. Document any configuration changes needed

Would it help if I:

  • Fork and test locally with your authentication setup?
  • Create a more gradual upgrade path (e.g., 4.0.0 → 4.2.x → 4.5.9)?
  • Add specific testing instructions to the PR for your staging environment?

Given the CVE severity (9.1 CVSS - authentication bypass), I'd like to help find a safe path forward. Let me know what would work best for your team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants