<?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>Magicmirror — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/magicmirror/</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>Tue, 09 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/magicmirror/feed.xml" rel="self" type="application/rss+xml"/><item><title>MagicMirror² Unauthenticated SSRF Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-magicmirror-ssrf/</link><pubDate>Tue, 09 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-magicmirror-ssrf/</guid><description>An unauthenticated Server-Side Request Forgery (SSRF) vulnerability in MagicMirror² allows remote attackers to force the server to perform arbitrary HTTP requests, exfiltrate environment variables, and potentially compromise cloud instances or internal networks.</description><content:encoded><![CDATA[<p>MagicMirror² version 2.35.0 and earlier is vulnerable to an unauthenticated Server-Side Request Forgery (SSRF) vulnerability in the <code>/cors</code> endpoint. This flaw enables remote attackers to manipulate the MagicMirror² server into initiating arbitrary HTTP requests to internal networks, cloud metadata services (AWS, GCP, Azure), and localhost services. The vulnerability is located in the <code>js/server_functions.js</code> file, specifically within the <code>cors()</code> function. Attackers can exploit this by sending a crafted GET request to the <code>/cors</code> endpoint with a malicious URL. The server expands environment variable placeholders within the URL before making the request, allowing exfiltration of sensitive information. This vulnerability poses a significant risk to cloud deployments and internal networks, potentially leading to full compromise of cloud instance credentials and access to internal resources.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a MagicMirror² instance exposed on a network (default port 8080).</li>
<li>Attacker crafts a GET request to the <code>/cors</code> endpoint with a target URL pointing to a cloud metadata service (e.g., <code>http://169.254.169.254/latest/meta-data/</code>).</li>
<li>The MagicMirror² server receives the request and, without authentication or validation, processes the URL.</li>
<li>The <code>replaceSecretPlaceholder()</code> function expands any environment variable placeholders (e.g., <code>**SECRET_API_KEY**</code>) in the URL.</li>
<li>The server uses the <code>fetch()</code> function to make an HTTP request to the target URL.</li>
<li>The cloud metadata service (or internal service) responds to the MagicMirror² server.</li>
<li>The MagicMirror² server forwards the full response, including sensitive data like IAM role credentials or internal service responses, back to the attacker.</li>
<li>The attacker obtains sensitive information, potentially leading to full cloud instance compromise, internal network access, or secret exfiltration.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SSRF vulnerability can have severe consequences. Cloud deployments (AWS/GCP/Azure) are at risk of full compromise due to access to instance metadata, including IAM role credentials. This can allow attackers to move laterally within the cloud account. Internal networks become accessible to the attacker through the compromised MagicMirror² server, allowing for scanning and interaction with internal services. Sensitive information such as API keys, database credentials, and other configuration data stored as environment variables can be exfiltrated. This impacts anyone running MagicMirror² exposed to an untrusted network.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect MagicMirror CORS Endpoint SSRF Attempt</code> to identify potential exploitation attempts by monitoring for requests to the <code>/cors</code> endpoint with URLs targeting metadata services or internal IPs.</li>
<li>Deploy the Sigma rule <code>Detect MagicMirror Environment Variable Exfiltration</code> to detect requests to the <code>/cors</code> endpoint attempting to exfiltrate environment variables.</li>
<li>Block access to the following IOC at the network level to prevent initial reconnaissance: <code>169.254.169.254</code> (AWS IMDSv1 metadata service).</li>
<li>Upgrade MagicMirror² to a version higher than 2.35.0 to patch CVE-2026-42281.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>ssrf</category><category>magicmirror</category><category>cve-2026-42281</category></item></channel></rss>