Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/googlesky/cve-2026-129358
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLabs & Practice
GitHubgooglesky/cve-2026-129358

CVE-2026-129358

Proof-of-concept and lab for CVE-2026-129358, a stored XSS in Magma NMS <=1.9.0 where unescaped organization names break out of the inline CONFIG script.

View Repository
3 days agoNot yet reviewed
Website

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-129358 — Magma NMS stored XSS: the organization name is rendered unescaped into every page's inline CONFIG script

License: MIT Research status: validated

CVECVE-2026-129358 (VDB-437421)
ComponentLinux Foundation Magma NMS — nms/server/main/routes.ts (handleReact) + nms/server/views/index.pug (unescaped !{configJson}), name stored via nms/server/host/routes.ts (POST /host/organization/async)
AffectedMagma ≤ 1.9.0 (both files byte-identical in master; single commit since 2022)
Fixed innothing upstream at the time of this laboratory; the fixed side is a hash-checked synthetic remediation (documented as such)
CWECWE-79 (Cross-site Scripting, Stored)
ImpactSession/credential theft for every member of a poisoned organization: the stored organization name executes as script in members' browsers on /nms* and /settings
VectorThe organization name is stored with no validation by any caller able to create organizations (a host-org user, per the sibling CVE-2026-129357); members trigger execution by logging in
Triggerorganization name xss-</script><script>alert(document.cookie)</script> — served raw inside var CONFIG = …

The React entrypoint of every NMS page embeds session and organization data as an inline script, and the template interpolates it UNESCAPED:

// nms/server/main/routes.ts, handleReact (tag v1.9.0)
configJson: JSON.stringify({appData}),      // tenant = organization.name
res.render('index', {staticDist, configJson});
// nms/server/views/index.pug
var CONFIG = !{configJson};

JSON.stringify does not encode <, so an organization whose name is xss-</script><script>alert(document.cookie)</script> closes the script block and executes in every member's browser. The name is stored with no validation by POST /host/organization/async (and persists in the database — a stored payload).

This laboratory runs the real Magma NMS server (v1.9.0, the upstream node/yarn build) with its real local auth over Postgres. The PoC reproduces the publicly disclosed flow: the host-org admin creates the poisoned organization with a custom domain, adds a member, the member logs in and requests /nms/ — the payload's raw </script><script> breakout is served to the member on the vulnerable build; the remediated build escapes it (\u003c) so it cannot leave the script context.


1. Root cause

Two facts compose:

  1. storage without validation — POST /host/organization/async (nms/server/host/routes.ts) writes req.body.name straight into the Organizations table;
  2. rendering without escaping — handleReact serializes the org name into configJson, and index.pug's !{configJson} is Pug's unescaped interpolation; JSON.stringify leaves < and > untouched, so the string breaks out of the enclosing <script>var CONFIG = …</script> block.

Every member page of the poisoned organization (/nms*, /settings) carries the executed payload — document.cookie is readable in that origin (the session cookie is not HttpOnly-protected from script in this rendering path in v1.9.0 configurations). The e-mail field is a secondary carrier with the same sink; the organization name is the published vector.

2. Reproduction environment

serviceimagerole
xss-vulncve-2026-129358:vulnMagma v1.9.0 as released (upstream nms Docker build), standalone with its own Postgres
xss-fixedcve-2026-129358:fixedthe same tree with lab/patch-fixed.py (hash-checked): < > & and U+2028/U+2029 escaped in the serialized configJson at every serialization site
xss-db-vuln / xss-db-fixedpostgres:9.5one per side, per the product's own compose topology
poccve-2026-129358-poc:localstdlib-only Python driver

Seeded with the upstream setAdminPassword script (host org + admin superuser). The PoC itself creates the poisoned organization (custom domain pwned.localhost) and its member, mirroring the publicly disclosed exploit. Environment adjustments documented in evidence/versions.txt (standalone-NMS tenants shim applied equally to both sides; dev-mode runtime for the plain-HTTP lab network).

3. Running the environment

./run-lab.sh build     # upstream nms build at v1.9.0 (vuln + fixed trees)
./run-lab.sh up        # cve129358lab network, two NMS+Postgres stacks
./run-lab.sh sweep     # check / exploit / probe / mitigation on both sides
./run-lab.sh down

4. The PoC

poc/poc.py (stdlib only; mirrors the publicly disclosed exploit flow):

  • check — store the payload org, member login, one /nms/ fetch, classify RAW-SCRIPT vs ESCAPED. Exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.
  • exploit — admin session → payload persisted (409 on re-runs = already stored) → member session under the custom domain → the served page shows the raw breakout and the tenant field carrying it.
  • probe — payload variants (script breakout, img onerror, svg onload) × member pages.
  • mitigation — no upstream fix; the fixed container is the form a fix takes (inline-JSON escaping); deployment mitigation is organization-name validation at creation.

5. Expected results

runxss-vuln (v1.9.0)xss-fixed (synthetic)
check victim fetches /nms/RAW-SCRIPT — tenant":"xss-</script><script>alert(document.cookie)…ESCAPED — tenant":"xss-\u003c/script\u003e\u003cscript\u003e…
exploit tenant fieldraw breakout servedescaped, cannot leave the script block
probe script breakoutRAW-SCRIPTESCAPED
probe img onerror / svg onloadRAW-SCRIPT (in the rendered page)ABSENT
mitigationRAW-SCRIPTESCAPED

Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt, evidence/probe-*-run.txt, evidence/mitigation-*-run.txt, evidence/versions.txt, evidence/0day-sweep.txt.

6. Environment preconditions

  • Podman (or Docker) with network-creation rights; every container bounded on the isolated cve129358lab network.
  • Outbound HTTPS at image build (GitHub: magma v1.9.0; yarn registry).
  • ~2 GB RAM per NMS container.

7. Additional findings (0-day sweep on the fixed line)

The payload-variant matrix is the surface sweep (evidence/0day-sweep.txt): all three XSS shapes render raw on the shipped build; the remediation escapes the breakout and keeps the tag-shaped variants out of the page entirely. The sibling privilege escalation that lets a low-privilege host-org user create the poisoned organization is CVE-2026-129357, reproduced in CVE-2026-129357.

8. Repository layout

README.md                 this write-up
run-lab.sh                environment driver (build / up / sweep / down)
Makefile                  convenience targets
poc/poc.py                the PoC (check / exploit / probe / mitigation)
poc/Dockerfile            runner image (python:3.12-alpine)
lab/lab.Dockerfile        multi-stage build (magma v1.9.0 → nms image)
lab/patch-tenants-shim.py environment shim, applied to BOTH sides equally
lab/patch-fixed.py        the hash-checked synthetic remediation (v3)
lab/entrypoint.sh         migrations → admin → server
evidence/                 captured runs of every mode on both sides
TRACKING.md               excluded (working record)

9. References

  • CVE record — https://www.cve.org/CVERecord?id=CVE-2026-129358
  • VulDB entry — https://vuldb.com/vuln/437421
  • Magma — https://github.com/magma/magma (nms/server/main/routes.ts, nms/server/views/)
Download Tool