{"answers":{"affected":"4 open source packages ship an affected version, including org.pac4j:pac4j-core. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-40458 in the wild and no public exploit code.","fix":"Upgrade org.pac4j:pac4j-core to a fixed version for your release line: 5.7.10 or 6.4.1.","what":"CVE-2026-40458 is a high-severity vulnerability in PAC4J, published on 17 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-40458 and fix it if it is affected.\n\nWhat it is: CVE-2026-40458 is a high-severity vulnerability in PAC4J, published on 17 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-40458 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.pac4j:pac4j-core (Maven): affected all versions; fixed in 5.7.10\n- org.pac4j:pac4j-core (Maven): affected all versions; fixed in 5.7.10\n- org.pac4j:pac4j-core (Maven): affected from 6.0.0-RC1; fixed in 6.4.1\n- org.pac4j:pac4j-core (Maven): affected from 6.0.0-RC1; fixed in 6.4.1\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-2026-40458/ (Markdown: https://insights.sbomify.com/CVE-2026-40458/index.md)","id":"CVE-2026-40458","markdown":"https://insights.sbomify.com/CVE-2026-40458/index.md","name":"CVE-2026-40458","record":{"aliases":["ECHO-1c01-a9c0-c59f","GHSA-xw5c-jc7x-gf75","MINI-mpvc-87fh-fqhw","MINI-p499-66xw-gw5w"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["account_takeover","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Java security library","requires_auth":"none","summary":"Attackers can bypass CSRF protection via hash collisions to perform unauthorized state-changing actions like password changes.","user_interaction":"required","vuln_class":"csrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"CERT-PL","cpe":[{"product":"pac4j","vendor":"pac4j"}],"cvss":{"score":7,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"description":"PAC4J is vulnerable to Cross-Site Request Forgery (CSRF). A malicious attacker can craft a specially designed website which, when visited by a user, will automatically submit a forged cross-site request with a token whose hash collides with the victim's legitimate CSRF token. Importantly, the attacker does not need to know the victim’s CSRF token or its hash prior to the attack. Collisions in the deterministic String.hashCode() function can be computed directly, reducing the effective token's security space to 32 bits. This bypasses CSRF protection, allowing profile updates, password changes, account linking, and any other state-changing operations to be performed without the victim's consent.\n\nThis issue was fixed in PAC4J versions 5.7.10 and 6.4.1","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Cross-Site Request Forgery in PAC4J","id":"CVE-2026-40458","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"csrf","year":"2026"},"n_packages":4,"n_references":2,"next":{"headline":"LDAP Injection in PAC4J","id":"CVE-2026-40459"},"packages":[{"ecosystem":"Maven","fixed":["5.7.10"],"introduced":["0"],"last_affected":[],"package":"org.pac4j:pac4j-core","purl":null,"source":"GHSA-xw5c-jc7x-gf75"},{"ecosystem":"Maven","fixed":["5.7.10"],"introduced":["0"],"last_affected":[],"package":"org.pac4j:pac4j-core","purl":"pkg:maven/org.pac4j/pac4j-core","source":"GHSA-xw5c-jc7x-gf75"},{"ecosystem":"Maven","fixed":["6.4.1"],"introduced":["6.0.0-RC1"],"last_affected":[],"package":"org.pac4j:pac4j-core","purl":null,"source":"GHSA-xw5c-jc7x-gf75"},{"ecosystem":"Maven","fixed":["6.4.1"],"introduced":["6.0.0-RC1"],"last_affected":[],"package":"org.pac4j:pac4j-core","purl":"pkg:maven/org.pac4j/pac4j-core","source":"GHSA-xw5c-jc7x-gf75"}],"prev":{"headline":"Reflected XSS in LMS","id":"CVE-2026-40457"},"products":["PAC4J"],"published":"2026-04-17","related":[{"cvss_score":8.7,"headline":"LDAP Injection in PAC4J","id":"CVE-2026-40459","kev_date_added":null,"published":"2026-04-17"},{"cvss_score":7.5,"headline":"Pac4j token validation bypass if OpenID Connect provider supports none algorithm","id":"CVE-2021-44878","kev_date_added":null,"published":"2022-01-06"},{"cvss_score":4.9,"headline":"Use of Cryptographically Weak Pseudo-Random Number Generator in org.pac4j:pac4j-saml","id":"CVE-2019-10755","kev_date_added":null,"published":"2019-09-23"}],"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":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-17","vendors":["PAC4J"]},"summary":"Attackers can bypass CSRF protection via hash collisions to perform unauthorized state-changing actions like password changes.","url":"https://insights.sbomify.com/CVE-2026-40458/"}