PT-2024-5297 · Openiam · Openam

Aftersnows

·

Published

2024-07-24

·

Updated

2024-08-06

·

CVE-2024-41667

CVSS v2.0

9.0

High

VectorAV:N/AC:L/Au:S/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions OpenAM versions 15.0.3 and prior
Description The issue is related to the getCustomLoginUrlTemplate method in RealmOAuth2ProviderSettings.java, which is vulnerable to template injection due to its usage of user input. This vulnerability allows an attacker to execute arbitrary code remotely. The developer intended to implement a custom URL for handling login, but did not restrict the CustomLoginUrlTemplate, allowing it to be set freely. A fix is expected to be part of version 15.0.4, which introduces TemplateClassResolver.SAFER RESOLVER to disable the resolution of commonly exploited classes in FreeMarker template injection.
Recommendations For OpenAM versions 15.0.3 and prior, update to version 15.0.4 or later, which is expected to include the fix for this issue. As a temporary workaround, consider restricting the CustomLoginUrlTemplate to prevent it from being set freely. Additionally, disabling the getCustomLoginUrlTemplate method until a patch is available can help minimize the risk of exploitation.

Exploit

Fix

Code Injection

Weakness Enumeration

Related Identifiers

BDU:2024-05922
CVE-2024-41667
GHSA-7726-43HG-M23V

Affected Products

Openam