<?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/"><channel><title>Nginx-UI — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/nginx-ui/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 14:30:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/nginx-ui/feed.xml" rel="self" type="application/rss+xml"/><item><title>Nginx-UI SSRF Vulnerability via Cluster Node Proxy</title><link>https://feed.craftedsignal.io/briefs/2024-01-nginx-ui-ssrf/</link><pubDate>Wed, 03 Jan 2024 14:30:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-nginx-ui-ssrf/</guid><description>Nginx-UI version 2.3.4 and earlier is vulnerable to Server-Side Request Forgery (SSRF) allowing authenticated users to access internal services by manipulating cluster node configurations.</description><content:encoded><![CDATA[<p>Nginx-UI versions 2.3.4 and earlier contain a Server-Side Request Forgery (SSRF) vulnerability in the cluster node proxy middleware. An authenticated user can exploit this flaw by creating a malicious cluster node that points to an arbitrary internal URL, such as localhost services or cloud metadata endpoints. The vulnerability lies in the lack of validation for the node URL within the <code>internal/middleware/proxy.go</code> file. Successful exploitation allows attackers to bypass network segmentation, access sensitive internal resources, and potentially escalate privileges, especially when combined with other vulnerabilities like njs code injection. This issue allows attackers to reach internal services that should not be exposed.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker authenticates to the Nginx-UI web interface.</li>
<li>Attacker retrieves the <code>node_secret</code> via a <code>GET</code> request to <code>/api/settings</code>.</li>
<li>Attacker crafts a <code>POST</code> request to <code>/api/nodes</code> to create a new cluster node.</li>
<li>The crafted node configuration includes a malicious <code>url</code> parameter pointing to an internal resource (e.g., <code>http://127.0.0.1:51820</code> or <code>http://169.254.169.254</code>).</li>
<li>Attacker sends an API request (e.g., <code>GET /api/settings</code>) with the <code>X-Node-ID</code> header set to the ID of the newly created malicious node.</li>
<li>The Nginx-UI proxy middleware (<code>internal/middleware/proxy.go</code>) intercepts the request and forwards it to the attacker-specified internal URL.</li>
<li>The request is executed on the server-side, effectively performing an SSRF attack.</li>
<li>Attacker gains access to internal resources, cloud metadata, or triggers internal-only njs endpoints.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows an authenticated attacker to access internal services, cloud metadata endpoints, and internal-only njs endpoints. This can lead to the theft of sensitive information such as IAM credentials, port scanning of internal networks, and ultimately, remote code execution and privilege escalation if combined with other vulnerabilities. This vulnerability bypasses network segmentation and firewalls designed to restrict inbound traffic, potentially exposing critical internal resources.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect Nginx-UI SSRF via X-Node-ID Header</code> to identify requests with the <code>X-Node-ID</code> header that may indicate SSRF attempts.</li>
<li>Deploy the Sigma rule <code>Detect Nginx-UI Malicious Node Creation</code> to detect the creation of cluster nodes with suspicious URLs (e.g., internal IPs).</li>
<li>Monitor network connections originating from the Nginx-UI server to internal IPs and cloud metadata endpoints using existing network monitoring tools.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssrf</category><category>nginx-ui</category><category>web-application</category></item></channel></rss>