# CVE-2026-63640: MagicMirror socket payload secret placeholder expansion can disclose SECRET_* environment variables

> An attacker can disclose SECRET_* environment variables by exploiting a placeholder expansion flaw in the socket dispatcher when secret hiding is enabled.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Aug 2026
- **Updated:** 18 Aug 2026
- **Also known as:** GHSA-q4gh-4ffp-5cg8

## What is CVE-2026-63640?

CVE-2026-63640 is a medium-severity vulnerability in MagicMirrorOrg MagicMirror, published on 18 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

MagicMirror² is an open source modular smart mirror platform. Prior to 2.37.0, when hideConfigSecrets is enabled, the catch-all socket dispatcher in js/node_helper.js passes every inbound object payload through replaceSecretPlaceholder in js/server_functions.js before invoking socketNotificationReceived. A client connected to a loaded module namespace can submit a SECRET_API_KEY placeholder, causing the server to replace it with the corresponding process environment value. The default weather helper accepts INIT_WEATHER, copies the attacker-controlled instanceId, and returns it in WEATHER_ERROR, providing an echo path for the expanded secret. This reverses the intended one-way redaction boundary and can disclose API tokens, credentials, or service keys stored in SECRET_ variables. This issue is fixed in version 2.37.0.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2026-63640?

2 open source packages ship an affected version, including magicmirror.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `magicmirror` | npm | All versions | 2.37.0 |
| `magicmirror` | npm | All versions | 2.37.0 |

## How do I fix CVE-2026-63640?

Upgrade magicmirror to 2.37.0 or later.

## Is CVE-2026-63640 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-63640 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-63640 and fix it if it is affected.

What it is: CVE-2026-63640 is a medium-severity vulnerability in MagicMirrorOrg MagicMirror, published on 18 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-63640 exists.

Affected packages and fixed versions:
- magicmirror (npm): affected all versions; fixed in 2.37.0
- magicmirror (npm): affected all versions; fixed in 2.37.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-63640/ (Markdown: https://insights.sbomify.com/CVE-2026-63640/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-63640
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-63640
- OSV: https://osv.dev/vulnerability/CVE-2026-63640

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-63640/
Summaries are generated and may contain mistakes; the official description above is the record.
