{"answers":{"affected":"2 open source packages ship an affected version, including org.openidentityplatform.openam:openam-oauth2.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-41667 exists.","fix":"Upgrade org.openidentityplatform.openam:openam-oauth2 to 15.0.4 or later.","what":"CVE-2024-41667 is a high-severity code injection vulnerability in OpenIdentityPlatform OpenAM, published on 24 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-41667 and fix it if it is affected.\n\nWhat it is: CVE-2024-41667 is a high-severity code injection vulnerability in OpenIdentityPlatform OpenAM, published on 24 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-41667 exists.\n\nAffected packages and fixed versions:\n- org.openidentityplatform.openam:openam-oauth2 (Maven): affected all versions; fixed in 15.0.4\n- org.openidentityplatform.openam:openam-oauth2 (Maven): affected all versions; fixed in 15.0.4\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-2024-41667/ (Markdown: https://insights.sbomify.com/CVE-2024-41667/index.md)","id":"CVE-2024-41667","markdown":"https://insights.sbomify.com/CVE-2024-41667/index.md","name":"CVE-2024-41667","record":{"aliases":["GHSA-7726-43hg-m23v"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"OpenAM access management","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code via FreeMarker template injection in OpenAM's custom login URL configuration, requiring administrative access to set the vulnerable template.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"OpenAM is an open access management solution. In versions 15.0.3 and prior, the `getCustomLoginUrlTemplate` method in RealmOAuth2ProviderSettings.java is vulnerable to template injection due to its usage of user input. Although the developer intended to implement a custom URL for handling login to override the default OpenAM login, they did not restrict the `CustomLoginUrlTemplate`, allowing it to be set freely. Commit fcb8432aa77d5b2e147624fe954cb150c568e0b8 introduces `TemplateClassResolver.SAFER_RESOLVER` to disable the resolution of commonly exploited classes in FreeMarker template injection. As of time of publication, this fix is expected to be part of version 15.0.4.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2024/CVE-2024-41667.yaml","stars":null,"title":"OpenAM\u003c=15.0.3 FreeMarker - Template Injection"}],"tier":"weaponised"},"has_fix":true,"headline":"OpenAM FreeMarker template injection","id":"CVE-2024-41667","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":2,"n_references":2,"next":{"headline":"cBioPortal Proxy Endpoint Vulnerabliity","id":"CVE-2024-41668"},"packages":[{"ecosystem":"Maven","fixed":["15.0.4"],"introduced":["0"],"last_affected":[],"package":"org.openidentityplatform.openam:openam-oauth2","purl":null,"source":"GHSA-7726-43hg-m23v"},{"ecosystem":"Maven","fixed":["15.0.4"],"introduced":["0"],"last_affected":[],"package":"org.openidentityplatform.openam:openam-oauth2","purl":"pkg:maven/org.openidentityplatform.openam/openam-oauth2","source":"GHSA-7726-43hg-m23v"}],"prev":{"headline":"The Argo CD web terminal session does not handle the revocation of user permissions properly.","id":"CVE-2024-41666"},"products":["OpenAM"],"published":"2024-07-24","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":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-06","vendors":["OpenIdentityPlatform"]},"summary":"Attackers can execute arbitrary code via FreeMarker template injection in OpenAM's custom login URL configuration, requiring administrative access to set the vulnerable template.","url":"https://insights.sbomify.com/CVE-2024-41667/"}