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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.06% (26th 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 ID SNYK-JAVA-ORGOPENIDENTITYPLATFORMOPENAM-7558672
  • published 25 Jul 2024
  • disclosed 24 Jul 2024
  • credit AfterSnows

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
Expand this section

Snyk

Recommended
7.3 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    Active
  • Confidentiality (VC)
    High
  • Integrity (VI)
    High
  • Availability (VA)
    High
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None