CVE-2024-41667 Scanner

CVE-2024-41667 Scanner - Server Side Template Injection (SSTI) vulnerability in OpenAM

Short Info


Level

High

Single Scan

Single Scan

Can be used by

Asset Owner

Estimated Time

10 seconds

Time Interval

10 days 3 hours

Scan only one

Domain, IPv4

Toolbox

-

OpenAM is a comprehensive open-source access management solution utilized by businesses and organizations to manage user authentication, authorization, and federation, ensuring secure access to applications and resources. It is widely adopted across various industries, including healthcare, financial services, and education, offering features such as single sign-on (SSO), identity federation, and adaptive authentication. OpenAM integrates with existing infrastructures, enhancing security protocols and streamlining user access management. Organizations use OpenAM to improve user experience and operational efficiency by integrating it with cloud-based services, mobile applications, and on-premises systems. The platform supports a range of identity standards, making it a versatile tool for identity and access management (IAM). With its customizable architecture, OpenAM can be tailored to meet specific organizational security and access control requirements.

Server-Side Template Injection (SSTI) is a vulnerability that arises when user-input is embedded into templates without proper validation. This vulnerability allows attackers to execute arbitrary code on the server by injecting malicious templates. In the context of OpenAM, SSTI exists in the `getCustomLoginUrlTemplate` method due to improper handling of user inputs in template rendering, specifically in versions 15.0.3 and earlier. Exploiting this flaw could lead to unauthorized access and control over server-side resources. If successful, attackers can escalate their privileges or extract sensitive data from the server. OpenAM systems that do not apply input validation are at increased risk of SSTI exploits, making it essential to update and reinforce security measures.

The technical flaw lies within the "getCustomLoginUrlTemplate" function in <code>RealmOAuth2ProviderSettings.java</code>, which processes user inputs into server-side templates. Malicious actors can manipulate this input to execute commands on the host server. The vulnerability is further exposed by weak input validation and reliance on potentially unsafe template frameworks. Attackers exploit this weakness by crafting payloads that inject executable code into the template engine, which subsequently processes it leading to code execution. Successful exploitation involves crafting specific HTTP requests to the OpenAM service endpoint, bypassing normal operational constraints. The affected parameter is often where template code markup exists without restriction, allowing attacker-supplied data and logic to be improperly executed on the server.

If successfully exploited, this vulnerability can have severe consequences, including complete system compromise. Attackers could gain unauthorized access to sensitive information, manipulate or destroy data, or disrupt services by executing arbitrary commands. The ability to inject code through SSTI may lead to unauthorized administrative actions or even create backdoors for persistent access. Moreover, sensitive data processed by OpenAM, such as authentication credentials and user identity information, could be extracted and misused. This not only impacts the integrity of the system but also poses a threat to any connected systems relying on OpenAM for secure identity management.

REFERENCES

Get started to protecting your Free Full Security Scan