{"answers":{"affected":"2 open source packages ship an affected version, including org.pac4j:pac4j-core.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25581 exists.","fix":"Upgrade org.pac4j:pac4j-core to 4.0.0 or later.","what":"CVE-2023-25581 is a critical unsafe deserialization vulnerability in pac4j, published on 10 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-25581 and fix it if it is affected.\n\nWhat it is: CVE-2023-25581 is a critical unsafe deserialization vulnerability in pac4j, published on 10 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25581 exists.\n\nAffected packages and fixed versions:\n- org.pac4j:pac4j-core (Maven): affected all versions; fixed in 4.0.0\n- org.pac4j:pac4j-core (Maven): affected all versions; fixed in 4.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-25581/ (Markdown: https://insights.sbomify.com/CVE-2023-25581/index.md)","id":"CVE-2023-25581","markdown":"https://insights.sbomify.com/CVE-2023-25581/index.md","name":"CVE-2023-25581","record":{"aliases":["GHSA-76mw-6p95-x9x5"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Java security framework","requires_auth":"none","summary":"Remote code execution via unsafe Java deserialization in pac4j-core when processing specially crafted attributes in UserProfile objects.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.2,"severity":"critical","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2024-10-15","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-10-15T23:51:52Z","kind":"github_poc","ref":"https://github.com/p33d/CVE-2023-25581","stars":0,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"Deserialization of untrusted data in InternalAttributeHandler in pac4j","id":"CVE-2023-25581","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"deserialization","year":"2023"},"n_packages":2,"n_references":4,"next":{"headline":"Command injection in UR32L","id":"CVE-2023-25582"},"packages":[{"ecosystem":"Maven","fixed":["4.0.0"],"introduced":["0"],"last_affected":[],"package":"org.pac4j:pac4j-core","purl":null,"source":"GHSA-76mw-6p95-x9x5"},{"ecosystem":"Maven","fixed":["4.0.0"],"introduced":["0"],"last_affected":[],"package":"org.pac4j:pac4j-core","purl":"pkg:maven/org.pac4j/pac4j-core","source":"GHSA-76mw-6p95-x9x5"}],"prev":{"headline":"Directory traversal in Nextcloud server","id":"CVE-2023-25579"},"products":["pac4j"],"published":"2024-10-10","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-10-10","vendors":["pac4j"]},"summary":"Remote code execution via unsafe Java deserialization in pac4j-core when processing specially crafted attributes in UserProfile objects.","url":"https://insights.sbomify.com/CVE-2023-25581/"}