jooby-pac4j: deserialization of untrusted data
Package
Affected versions
< 2.17.0
>= 3.0.0.M1, < 3.7.0
Patched versions
2.17.0
3.7.0
Description
Published by the National Vulnerability Database
Mar 31, 2025
Published to the GitHub Advisory Database
Apr 1, 2025
Reviewed
Apr 1, 2025
Last updated
Apr 1, 2025
Impact
Versions after 2.x and before 3.x of io.jooby:jooby-pac4j can cause deserialization of untrusted data
Patches
Workarounds
References
Version 2.x:
https://github.com/jooby-project/jooby/blob/v2.x/modules/jooby-pac4j/src/main/java/io/jooby/internal/pac4j/SessionStoreImpl.java#L39-L45
Version 3.x:
https://github.com/jooby-project/jooby/blob/v3.6.1/modules/jooby-pac4j/src/main/java/io/jooby/internal/pac4j/SessionStoreImpl.java#L77-L84
Cause
In module pac4j io.jooby.internal.pac4j.SessionStoreImpl#get , it is used to handle sessions , and trying to get key value. In strToObject function ,it's trying to deserialize value when value starts with "b64~" , which might cause deserialization of untrusted data.
modules/jooby-pac4j/src/main/java/io/jooby/internal/pac4j/SessionStoreImpl.java
Here's a small demo using SessionStoreImpl#get to handle sessions ,and user can pass parameters.
And following below is exploiting successfully(execute calculator)
References