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
CVE-2026-129357 — PoC lab for CVE-2026-129357: a role-0 Magma NMS host-org user creates SUPERUSER accounts via POST add_user, with Docker lab, exploit driver, and synthetic fix. | Kitploit
Tools/GitHubGitHub/googlesky/cve-2026-129357
Authentication & AuthorizationPrivilege EscalationExploitationWeb Application ExploitationWeb SecurityPenetration TestingLabs & Practice
GitHubgooglesky/cve-2026-129357

CVE-2026-129357

PoC lab for CVE-2026-129357: a role-0 Magma NMS host-org user creates SUPERUSER accounts via POST add_user, with Docker lab, exploit driver, and synthetic fix.

View Repository
4 days agoNot yet reviewed
Share
Website

CVE-2026-129357 — Magma NMS: a read-only member of the host organization manufactures SUPERUSER accounts with one POST

License: MIT Research status: validated

CVECVE-2026-129357 (VDB-437420)
ComponentLinux Foundation Magma NMS — nms/server/host/middleware.ts (hostOrgMiddleware) and nms/server/host/routes.ts (add_user)
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-862 (Missing Authorization), CWE-269 (Improper Privilege Management)
ImpactVertical privilege escalation to NMS SUPERUSER: any authenticated role-0 (read-only) member of the host organization creates SUPERUSER accounts in any organization with a single request
VectorNetwork, authenticated as the lowest-privilege host-org user — POST /host/organization/async/<org>/add_user with "role": 3
Triggerthe organization of the request is resolved from the Host header (host.<domain> selects the host org); the route stores the request body's role verbatim

The NMS host-organization subtree gates on "is the requesting tenant the host organization" and nothing else: hostOrgMiddleware checks only organization.isHostOrg (the org resolved from the Host header), the subtree sits behind access(USER) (any authenticated member, any role), and add_user writes the body's role straight into the Users table. A read-only user of the host organization therefore creates SUPERUSER accounts at will.

This laboratory runs the real Magma NMS server (tag v1.9.0, the upstream node/yarn build) with its real local auth stack (passport-local + Sequelize over Postgres — the standalone topology the product's own compose file ships) and proves the escalation end to end: the role-0 victim creates a SUPERUSER, and the manufactured account logs in and lists users as SUPERUSER.


1. Root cause

Three pieces compose (all at tag v1.9.0):

// nms/server/middleware/organizationMiddleware.ts — the tenant is the Host header
//   customDomains match, else host.split('.')[0] == organization name

// nms/server/host/middleware.ts — the ONLY gate on the /host subtree
export const hostOrgMiddleware = asyncHandler(async (req, res, next) => {
  if (req.organization) {
    const organization = await req.organization();
    if (organization.isHostOrg) { next(); return; }
  }
  return res.redirect(req.access?.loginUrl || '/user/login');
});

// nms/server/app.ts — the subtree's role gate is just "logged in"
app.use('/', csrfMiddleware(), access(AccessRoles.USER), mainRoutes);

// nms/server/host/routes.ts — the role is attacker data
const USER_PROPS = ['email', 'networkIDs', 'password', 'role', 'organization'] as const;
router.post('/organization/async/:name/add_user', asyncHandler(async (req, res) => {
  ...
  const props = await getPropsToUpdate(USER_PROPS, {organization: req.params.name, ...req.body}, ...);
  const user = await User.create(props);          // role: 3 stored verbatim
  res.status(200).send({user});
}));

isHostOrg() is name === 'host' — a property of the tenant named in the Host header, not of the caller's privilege. access(USER) (req.isAuthenticated() plus org equality) admits any role of that organization. The route never checks req.user.role before honoring an attacker-supplied one. Result: role 0 → SUPERUSER factory.

2. Reproduction environment

serviceimagerole
nms-vulncve-2026-129357:vulnMagma v1.9.0 as released (the upstream nms Docker build), standalone with its own Postgres
nms-fixedcve-2026-129357:fixedthe same tree with lab/patch-fixed.py (hash-checked): add_user requires a SUPERUSER caller and caps the granted role at the caller's
nms-db-vuln / nms-db-fixedpostgres:9.5one per side, per the product's own compose topology
poccve-2026-129357-poc:localstdlib-only Python driver

Seeded with the server's own models: the host organization + admin superuser (upstream setAdminPassword script), a victimorg, and [email protected] — role 0 in the host organization. Two environment adjustments are documented in evidence/versions.txt: the orc8r tenant mirror is a no-op (applied identically to both sides; it runs after the org row persists, off the vulnerable path), and the server runs in dev-mode so the session cookie is not Secure over the lab's plain-HTTP network (the shipped compose start:dev topology).

3. Running the environment

./run-lab.sh build     # upstream nms build at v1.9.0 (vuln + fixed trees)
./run-lab.sh up        # cve129357lab 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 — the role-0 victim attempts one add_user with "role": 3. Exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.
  • exploit — four stages: victim login → confirm genuinely low-privilege (user listing 302) → create the SUPERUSER in victimorg → the manufactured account logs in under its own org and lists users (HTTP 200), verifying working elevated access.
  • probe — role/org matrix: roles 0–3, cross-org, host-org itself, nonexistent org.
  • mitigation — no upstream fix; the fixed container is the form a fix takes; deployment mitigation is restricting the /host subtree to SUPERUSER at the reverse proxy.

5. Expected results

runnms-vuln (v1.9.0)nms-fixed (synthetic)
check role-0 add_user(role=3)HTTP 200, created role=3HTTP 403 insufficient role for user administration
exploit victim lists users directly302 (low-priv confirmed)302
exploit SUPERUSER created200, role=3403
exploit new account lists usersHTTP 200 — working SUPERUSER(not created)
probe roles 0–3 / host-org / cross-orgall 200, requested role storedall 403
probe nonexistent org404 (upstream behaviour)404

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 cve129357lab network.
  • Outbound HTTPS at image build (GitHub: magma v1.9.0; yarn registry).
  • ~2 GB RAM per NMS container (webpack build + babel-register runtime).

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

The role/org matrix is the surface sweep (evidence/0day-sweep.txt): every add_user form is refused on the remediated build, while the shipped v1.9.0 accepts them all. The stored-XSS sibling in the same subtree (organization name → rendered configJson) is CVE-2026-129358.

8. Repository layout

Download Tool

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.

    945
  • 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.

    350
  • 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.

    339
  • 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.

    338
  • 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.

    292

Explore all tools

Browse our collection of tools

View all tools →