<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Cpe:2.3:a:openidentityplatform:openam:*:*:*:*:*:*:*:* - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/cpes/cpe2.3aopenidentityplatformopenam/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/cpes/cpe2.3aopenidentityplatformopenam/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>OpenAM Pre-Authentication RCE via JATO ClientSession Deserialization</title><link>https://feed.craftedsignal.io/briefs/2024-01-openam-rce/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-openam-rce/</guid><description>OpenIdentityPlatform OpenAM is vulnerable to pre-authentication Remote Code Execution (RCE) via unsafe Java deserialization of the `jato.clientSession` HTTP parameter, allowing unauthenticated attackers to execute arbitrary commands on the server.</description><content:encoded><![CDATA[<p>OpenIdentityPlatform OpenAM 16.0.5, and likely earlier versions, is susceptible to a critical pre-authentication Remote Code Execution (RCE) vulnerability. This flaw stems from the unsafe Java deserialization of the <code>jato.clientSession</code> HTTP parameter. Unlike the patched <code>jato.pageSession</code> parameter (CVE-2021-35464), <code>jato.clientSession</code> lacks proper input validation, allowing an unauthenticated attacker to inject a malicious serialized Java object. Successful exploitation grants the attacker the ability to execute arbitrary operating system commands with the privileges of the application server user. The vulnerability affects any OpenAM deployment that exposes a JATO endpoint with <code>&lt;jato:form&gt;</code> tags in its JSP pages, such as those used for password resets, making it a widespread threat to OpenAM installations.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies an OpenAM endpoint that uses JATO ViewBeans and contains <code>&lt;jato:form&gt;</code> tags in its JSP (e.g., the password reset page).</li>
<li>The attacker crafts a malicious serialized Java object designed to execute arbitrary commands. This payload leverages the <code>PriorityQueue</code>, <code>Column$ColumnComparator</code>, <code>PropertyUtils</code>, <code>TemplatesImpl</code>, and <code>EvilTranslet</code> classes bundled within the OpenAM WAR file.</li>
<li>The attacker encodes the malicious serialized object using HTTP Base64 encoding.</li>
<li>The attacker sends an HTTP GET or POST request to the vulnerable endpoint, including the Base64-encoded payload as the value of the <code>jato.clientSession</code> parameter.</li>
<li>The OpenAM server receives the request and passes the <code>jato.clientSession</code> parameter to <code>RequestContextImpl.getClientSession()</code>.</li>
<li>During JSP rendering, the <code>&lt;jato:form&gt;</code> tag invokes <code>getClientSession()</code>, which in turn calls <code>hasAttributes()</code>, <code>getEncodedString()</code>, <code>isValid()</code>, and finally <code>ensureAttributes()</code>, triggering <code>deserializeAttributes()</code>.</li>
<li>The <code>deserializeAttributes()</code> method in <code>ClientSession.java</code> deserializes the <code>jato.clientSession</code> parameter using <code>Encoder.deserialize()</code> and <code>ApplicationObjectInputStream.readObject()</code> without proper input validation.</li>
<li>The malicious serialized object is deserialized, leading to the execution of the injected <code>EvilTranslet</code> bytecode and the execution of arbitrary OS commands.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The pre-authentication nature of this RCE vulnerability allows attackers to compromise OpenAM servers without requiring valid credentials or session tokens. A successful exploit can lead to full server compromise, enabling lateral movement within the network, data exfiltration, and other malicious activities. The vulnerability affects any OpenAM deployment with at least one accessible JATO endpoint whose JSP renders <code>&lt;jato:form&gt;</code> tags. OpenAM 16.0.5 is confirmed to be vulnerable and earlier versions are likely affected.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply <code>WhitelistObjectInputStream</code> filtering to <code>ClientSession.deserializeAttributes()</code> in <code>com/iplanet/jato/ClientSession.java</code>, mirroring the mitigation already in place for <code>ConsoleViewBeanBase.deserializePageAttributes()</code>.</li>
<li>Deploy the Sigma rule &quot;Detect OpenAM JATO ClientSession Deserialization Attempt&quot; to monitor for exploitation attempts targeting the <code>jato.clientSession</code> parameter.</li>
<li>Audit all callers of <code>Encoder.deserialize()</code> for user-controlled input to identify and mitigate other potential deserialization vulnerabilities.</li>
<li>As a defense-in-depth measure, consider implementing a JVM-wide JEP 290 deserialization filter to restrict deserialization to trusted classes.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>openam</category><category>rce</category><category>deserialization</category></item></channel></rss>