Versions after 2.x and before 3.x of io.jooby:jooby-pac4j can cause deserialization of untrusted data
Version 2.x:
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)
{
"cwe_ids": [
"CWE-502"
],
"github_reviewed": true,
"github_reviewed_at": "2025-04-01T14:19:43Z",
"nvd_published_at": "2025-03-31T19:15:43Z",
"severity": "HIGH"
}