# CVE-2023-25581: Deserialization of untrusted data in InternalAttributeHandler in pac4j

- Severity: Critical 9.2 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.94%, higher than 80% of CVEs (2026-12-01)
- Published: 2024-10-10T15:49:28.316Z
- Modified: 2026-06-17T05:41:32.250Z
- Also known as: GHSA-76mw-6p95-x9x5
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- pac4j pac4j: < 4.0.0; before 4.0.0
- org.pac4j:pac4j-core (Maven): before 4.0.0

## Every score

- GitHub_M: CVSS:4.0 9.2 Critical `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`

## References

- <https://securitylab.github.com/advisories/GHSL-2022-085_pac4j/>
- <https://github.com/frohoff/ysoserial> (web)
- <https://github.com/pac4j/pac4j/blob/5834aeb22ad3a4369dfa572be60d7b20f5784a8f/pac4j-core/src/main/java/org/pac4j/core/profile/InternalAttributeHandler.java#L95> (web)
- <https://portswigger.net/web-security/deserialization> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-25581> (advisory)
- <https://github.com/pac4j/pac4j> (package)
- <https://securitylab.github.com/advisories> (web)
- <https://securitylab.github.com/advisories/GHSL-2022-085_pac4j> (advisory)

## Sources

- CVE List: [CVE-2023-25581](https://www.cve.org/CVERecord?id=CVE-2023-25581), CVE Terms of Use, modified 2024-10-10
- GitHub Advisory Database: [GHSA-76mw-6p95-x9x5](https://github.com/advisories/GHSA-76mw-6p95-x9x5), CC-BY-4.0, modified 2024-10-14
- NVD: [CVE-2023-25581](https://nvd.nist.gov/vuln/detail/CVE-2023-25581), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-25581 · Whole record: https://cve.day/CVE-2023-25581.json · Rebuilt by cve.day 2026-11-25T22:58:34.331Z
