VYPR
High severity8.8NVD Advisory· Published Jul 24, 2024· Updated Apr 15, 2026

CVE-2024-41667

CVE-2024-41667

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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.openidentityplatform.openam:openam-oauth2Maven
< 15.0.415.0.4

Patches

1
fcb8432aa77d

FIX GHSA-7726-43hg-m23v disable the resolution of commonly exploited classes in FreeMarker template injection

https://github.com/OpenIdentityPlatform/OpenAMMaxim ThomasJul 23, 2024via ghsa
1 file changed · +3 0
  • openam-oauth2/src/main/java/org/forgerock/oauth2/core/RealmOAuth2ProviderSettings.java+3 0 modified
    @@ -13,6 +13,7 @@
      *
      * Copyright 2014-2016 ForgeRock AS.
      * Portions Copyrighted 2015 Nomura Research Institute, Ltd.
    + * Portions Copyrighted 2024 3A Systems LLC.
      */
     
     package org.forgerock.oauth2.core;
    @@ -39,6 +40,7 @@
     import java.util.Map;
     import java.util.Set;
     
    +import freemarker.core.TemplateClassResolver;
     import org.forgerock.guice.core.InjectorHolder;
     import org.forgerock.json.JsonValue;
     import org.forgerock.json.jose.jwk.KeyUse;
    @@ -963,6 +965,7 @@ public Template getCustomLoginUrlTemplate() throws ServerException {
                 if (loginUrlTemplateString != null) {
                     loginUrlTemplate = new Template("customLoginUrlTemplate", new StringReader(loginUrlTemplateString),
                             new Configuration());
    +                loginUrlTemplate.setNewBuiltinClassResolver(TemplateClassResolver.SAFER_RESOLVER);
                 }
                 return loginUrlTemplate;
             } catch (SSOException | IOException | SMSException e) {
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.