Deserialization of untrusted data in InternalAttributeHandler in pac4j
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-502.
Summary
pac4j is a security framework for Java. `pac4j-core` prior to version 4.0.0 is affected by a Java deserialization vulnerability. The vulnerability affects systems that store externally controlled values in attributes of the `UserProfile` class from pac4j-core. It can be exploited by providing an attribute that contains a serialized Java object with a special prefix `{#sb64}` and Base64 encoding. This issue may lead to Remote Code Execution (RCE) in the worst case. Although a `RestrictedObjectInputStream` is in place, that puts some restriction on what classes can be deserialized, it still allows a broad range of java packages and potentially exploitable with different gadget chains. pac4j versions 4.0.0 and greater are not affected by this issue. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pac4j | pac4j | before 4.0.0 | 4.0.0 | Patch available | CNA |
| — | org.pac4j:pac4j-core (Maven) | before 4.0.0 | 4.0.0 | Patch available | GHSA-76mw-6p95-x9x5 |
- pac4j Vendorpac4j Affected before 4.0.0 Fixed in 4.0.0 Patch available CNA
- org.pac4j:pac4j-core (Maven) Vendor— Affected before 4.0.0 Fixed in 4.0.0 Patch available GHSA-76mw-6p95-x9x5
Remediation
- Fix · CNA pac4j (pac4j) Fixed in 4.0.0
- Fix · GHSA-76mw-6p95-x9x5 org.pac4j:pac4j-core (Maven) Fixed in 4.0.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-25581
- 2026-10-03 Alias added: GHSA-76mw-6p95-x9x5
References
Advisory 2
Other 6
- https://securitylab.github.com/advisories/GHSL-2022-085_pac4j/
- https://github.com/frohoff/ysoserial
- https://github.com/pac4j/pac4j/blob/5834aeb22ad3a4369dfa572be60d7b20f5784a8f/pac4j-core/src/main/java/org/pac4j/core/profile/InternalAttributeHandler.java#L95
- https://portswigger.net/web-security/deserialization
- https://github.com/pac4j/pac4j
- https://securitylab.github.com/advisories
More pac4j vulnerabilities
- TI-2026-23172 pac4j-jwt JwtAuthenticator Authentication Bypass CVSS 4.0CRITICAL 9.3
- TI-2026-29211 LDAP Injection in PAC4J CVSS 4.0HIGH 8.7
- TI-2026-56857 pac4j-core before 6.5.6 Authorization Bypass via Reversed Profile Type Check CVSS 4.0HIGH 8.6
- TI-2026-56855 pac4j-oidc before 6.5.6 Privilege Escalation via Unverified Keycloak Access Token CVSS 4.0HIGH 8.6
- TI-2026-56856 pac4j-oidc before 6.5.6 Authentication Bypass via Access Token Substitution CVSS 4.0MEDIUM 6.9
- TI-2021-20310 If an OpenID Connect provider supports the "none" algorithm (i.e., tokens with no… CVSS 3.1HIGH 7.5
Sources
- CVE-2023-25581 · CVE Program
- CVE-2023-25581 · NVD
- FIRST EPSS
- GHSA-76mw-6p95-x9x5 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences