CVE-2025-31129

8.8 HIGH

📋 TL;DR

This vulnerability in Jooby's pac4j SessionStoreImpl module allows remote code execution through insecure deserialization of untrusted session data. Attackers can exploit this to execute arbitrary code on affected servers. All applications using vulnerable versions of Jooby with pac4j integration are affected.

💻 Affected Systems

Products:
  • Jooby web framework with pac4j integration
Versions: Jooby 2.x before 2.17.0, Jooby 3.x before 3.7.0
Operating Systems: All operating systems running Java applications
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using the pac4j module for session management. Applications without pac4j integration are not vulnerable.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing arbitrary code execution, data theft, and lateral movement within the network.

🟠

Likely Case

Remote code execution leading to application compromise, data exfiltration, and potential ransomware deployment.

🟢

If Mitigated

Limited impact if proper network segmentation and least privilege principles are implemented, though RCE is still possible.

🌐 Internet-Facing: HIGH - Web applications are directly exposed to external attackers who can craft malicious session data.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to manipulate session data, which typically requires some level of access or session hijacking capability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Jooby 2.17.0 (2.x branch) or Jooby 3.7.0 (3.x branch)

Vendor Advisory: https://github.com/jooby-project/jooby/security/advisories/GHSA-7c5v-895v-w4q5

Restart Required: No

Instructions:

1. Update pom.xml or build.gradle to use Jooby 2.17.0+ or 3.7.0+. 2. Run dependency update command (mvn clean install or gradle build). 3. Deploy updated application.

🔧 Temporary Workarounds

Disable pac4j session store

all

Temporarily disable or remove pac4j session store usage until patching is possible

Modify application configuration to use alternative session management

🧯 If You Can't Patch

  • Implement network segmentation to isolate vulnerable applications from critical systems
  • Deploy web application firewall with deserialization attack detection rules

🔍 How to Verify

Check if Vulnerable:

Check pom.xml or build.gradle for jooby-pac4j dependency version. If using Jooby 2.x < 2.17.0 or 3.x < 3.7.0 with pac4j, you are vulnerable.

Check Version:

mvn dependency:tree | grep jooby-pac4j OR gradle dependencies | grep jooby-pac4j

Verify Fix Applied:

Verify jooby-pac4j dependency version is 2.17.0+ (2.x) or 3.7.0+ (3.x) in build configuration files.

📡 Detection & Monitoring

Log Indicators:

  • Java deserialization errors in logs
  • Unexpected ClassNotFoundException or NoClassDefFoundError related to session objects
  • Suspicious network connections from application server

Network Indicators:

  • Unusual outbound connections from application server
  • Large serialized objects in HTTP sessions

SIEM Query:

source="application.logs" AND ("deserialization" OR "ClassNotFoundException" OR "NoClassDefFoundError") AND process="java"

🔗 References

📤 Share & Export