Template Injection Affecting org.openidentityplatform.openam:openam-oauth2 package, versions [,15.0.4)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.09% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGOPENIDENTITYPLATFORMOPENAM-7558672
  • published25 Jul 2024
  • disclosed24 Jul 2024
  • creditAfterSnows

Introduced: 24 Jul 2024

CVE-2024-41667  (opens in a new tab)
CWE-1336  (opens in a new tab)

How to fix?

Upgrade org.openidentityplatform.openam:openam-oauth2 to version 15.0.4 or higher.

Overview

Affected versions of this package are vulnerable to Template Injection in the getCustomLoginUrlTemplate() function. An attacker can inject templates containing executable elements into a custom URL on a malicious oauth2 proxy, and convince a user to visit it. To exploit this vulnerability the attacker must be in possession of a valid iPlanetDirectoryPro cookie value, and brute force the max_age parameter in a request.

PoC

<#assign value="freemarker.template.utility.Execute"?new()>${value("calc")}

CVSS Scores

version 4.0
version 3.1