WaratekVRT Sign in

CVE-2023-25581

Severity9.2 Critical CVSS 4.0
Fixed in4.0.0
WeaknessDeserialization of untrusted data (CWE-502)
Published10 Oct 2024
Updated17 Jun 2026

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.

Exploitation status

Proof of concept only

A proof of concept exists, but no reviewed exploit catalogue lists this CVE.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment exploitation: poc CISA recorded that an exploit has been demonstrated. Automatable: yes, technical impact: total.
  • Indexed PoC none indexed
  • EPSS 1.9% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR deserialization security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-502: Deserialization of Untrusted Data.

How to mitigate CVE-2023-25581

Upgrade the affected software to 4.0.0 or later. Until you can, Waratek RASP blocks exploitation with its deserialization and process rules. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.pac4j:pac4j-core 0 4.0.0 unbounded

Products and versions

1 product, 1 version entry
SourceVendorProductSchemeAffected versions
osv org.pac4j pac4j-core generic < 4.0.0

References

URLTags
https://github.com/frohoff/ysoserial WEB
https://github.com/pac4j/pac4j PACKAGE
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://securitylab.github.com/advisories WEB
https://securitylab.github.com/advisories/GHSL-2022-085_pac4j ADVISORY
https://securitylab.github.com/advisories/GHSL-2022-085_pac4j/

Timeline

Published2024-10-10By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.