{"id":"CVE-2024-41667","published":"2024-07-24T17:29:58Z","modified":"2024-08-06T19:35:10Z","title":"OpenAM FreeMarker template injection","vendor":"OpenIdentityPlatform","product":"OpenAM","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.03536,"percentile":0.89547,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/OpenIdentityPlatform/OpenAM/security/advisories/GHSA-7726-43hg-m23v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenIdentityPlatform/OpenAM/commit/fcb8432aa77d5b2e147624fe954cb150c568e0b8","tags":["x_refsource_MISC"]}],"priority":{"score":29.1,"factors":[{"name":"EPSS percentile","points":17.91},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.16}]},"exploitSources":{"nuclei":[{"id":"CVE-2024-41667","name":"OpenAM<=15.0.3 FreeMarker - Template Injection","severity":"high","path":"http/cves/2024/CVE-2024-41667.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-41667.yaml"}],"provenance":"source"},"vendorSlug":"openidentityplatform","affectedVersions":[{"vendor":"OpenIdentityPlatform","product":"OpenAM","versions":["< 15.0.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-07-26T17:25:50.314189Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.openidentityplatform.openam:openam-oauth2","vulnerableRanges":["<15.0.4"],"patched":["15.0.4"],"from":["GHSA-7726-43hg-m23v"],"provenance":"source"}],"summary":{"text":"OpenAM from OpenIdentityPlatform contains a FreeMarker template injection flaw in the getCustomLoginUrlTemplate method of RealmOAuth2ProviderSettings.java, where the CustomLoginUrlTemplate value taken from user input is not restricted. An attacker with network access and low-privileged authenticated access can supply a malicious template value and cause the server to execute attacker-controlled template logic, which requires no user interaction and no non-default configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T04:03:27Z"},"euvd":{"id":"EUVD-2024-2283","exploited":false,"provenance":"source"}}