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
poc-cve-2026-126187-rsc-usecache-rce — PoC: unauth RCE via Next.js use-cache typed-array framing desync (CVE-2026-126187 / GHSA-xqc2-xf4c-x3h3) | docker compose lab | Kitploit
Tools/GitHubGitHub/tahucryptsi/poc-cve-2026-126187-rsc-usecache-rce
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityRemote Access ToolLabs & Practice
GitHubtahucryptsi/poc-cve-2026-126187-rsc-usecache-rce

poc-cve-2026-126187-rsc-usecache-rce

PoC: unauth RCE via Next.js use-cache typed-array framing desync (CVE-2026-126187 / GHSA-xqc2-xf4c-x3h3) | docker compose lab

View Repository
2138 days agoReviewed by Kitploit

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.

    962
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    558
  • 3

    redforge

    cybersecurity91/redforge

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

    348
  • 4

    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.

    344
  • 5

    ARTEX

    baarai/artex

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

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

    297

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-126187 / GHSA-xqc2-xf4c-x3h3 — React Server Components use cache Typed-Array RCE

Unauthenticated RCE in React Server Components (react-server-dom-webpack/-parcel/-turbopack 19.0.0–19.3.0), reachable through Next.js App Router + Cache Components — differential-verified in Docker: arbitrary command execution on 16.4.0/19.3.0, clean fail on 16.4.1/19.3.1.

Authorized testing only. Use against systems you own or have written permission to test.

SeverityCritical — CVSS v4.0 9.5 (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N)
Vulnerablereact-server-dom-* 19.0.0 – 19.3.0 · Next.js 16.0.0 – 16.4.0 (App Router + Cache Components)
Fixedreact-server-dom-* 19.0.9 / 19.1.10 / 19.2.9 / 19.3.1 · Next.js 16.4.1
CWECWE-416 (UAF-equivalent desync) · CWE-706
PoCpoc.py — Python 3.8+, stdlib only, zero dependencies
LabDocker: vulnerable (port 3100) + patched (port 3101) for a one-command differential

TL;DR

docker compose up -d --build lab          # vulnerable Next.js 16.4.0 / React 19.3.0
python3 poc.py http://127.0.0.1:3100 --cmd 'id; uname -a'

Output on a fresh container:

[*] action id: 7fd83c9c2021a51139b13e6677e5fa38caee3da138
[+] chunk=4 overread=8192 HTTP 200
[+] Server Action executed with attacker-chosen arguments
================ action output ================
uid=1000(node) gid=1000(node) groups=1000(node)
Linux ee94eee5b39a ... aarch64 GNU/Linux
===============================================

No auth. No cookie. One GET with a crafted ?annotation= parameter → the app's own Server Action runs any command the attacker puts in --cmd, with output returned in the rendered page.


Why this PoC is valid (proof, not claims)

1. Differential verification — the core validity argument

The repo ships two labs from the same source tree, differing only in version:

LabNext.jsreact-server-dom-*Result
lab (port 3100)16.4.019.3.0RCE — command output returned
lab-patched (port 3101, --profile patched)16.4.119.3.1fails — annotation stays opaque Uint8Array(8278), no action invoked

Same app code, same PoC, same request shape. The only variable is the patched serializer. If the "exploit" were a lab artifact or a misconfiguration, both sides would behave identically. They don't — the attack succeeds exactly on the vulnerable range and fails exactly on the fixed version. That is the definition of a validated vulnerability PoC.

2. Unauthenticated, remote, output-bearing

  • No credentials, session, or CSRF token anywhere in the flow — a single GET.
  • Command output (uid=…, uname, arbitrary --cmd) is rendered back in the page, so execution is proven with attacker-visible evidence, not inferred from a side effect.
  • Action id is auto-discovered from the public page HTML / client chunks — nothing is hardcoded.

3. Verified in a clean-room container

Both images build from node:22-bookworm-slim with no cached state; the exploit lands on a fresh docker compose up. No host tooling, no pre-warmed cache, no manual steps. Re-run counts: exploit confirmed on every fresh rebuild.

4. Success/failure is machine-judged

poc.py exits 0 only when the annotation comes back as real action output (command results), and exits 1 when it stays an opaque Uint8Array(n) — the exact patched-version signature. CI-able as-is:

python3 poc.py http://127.0.0.1:3100 --cmd 'id' && echo VULNERABLE
python3 poc.py http://127.0.0.1:3101 --cmd 'id' || echo PATCHED-OK

Root cause

  1. A cached use cache function returns two Uint8Array views over one shared ArrayBuffer plus a caller-influenced annotation.
  2. Serialization of the first view transfers/detaches the shared buffer; the second view is emitted with its length header but no payload bytes; the stored cache entry ends mid-row.
  3. On cache re-read, the decoder consumes the declared byte count from following stream bytes (which include the attacker-supplied annotation) and resumes parsing there.
  4. Forged Flight rows at that resume offset define a server-reference chunk bound to attacker-chosen arguments; the framework invokes the referenced Server Action.

Pre-condition explains the AT:P in the CVSS vector: the app pattern (multi-view shared ArrayBuffer in a cached function) is rare in real applications.

attacker annotation (base64, attacker bytes)
        │
        ▼
┌─ use cache ────────────────────────────────────────┐
│  block0 [shared ArrayBuffer] ──► serialized, buffer│
│  block1 [same buffer]        ──► DETACHED: length  │
│                                    header, 0 bytes │
│  annotation  ──► attacker-controlled stream bytes  │
└────────────────────────────────────────────────────┘
        │  cache re-read: decoder reads block1's declared
        │  length FROM the annotation bytes, resumes parsing there
        ▼
   forged Flight rows ──► server-reference chunk ──► Server Action invoked
   with attacker arguments ──► /bin/sh -c "<attacker cmd>"

Repository layout

PathPurpose
poc.pystdlib-only exploit: action-id discovery, forged-row blob construction, request, output parser
lab/Next.js 16.4.0 + React 19.3.0 vulnerable app (Docker)
lab/app/payload.jsthe vulnerable use cache function
lab/app/actions.jslab stand-in for a privileged Server Action (/bin/sh -c)
lab/app/layout.jsxlab UI — dark terminal theme, zero dependencies
compose.yamlvulnerable (3100) + patched (3101) labs, one command each

Run (Docker)

# 1. vulnerable lab (Next.js 16.4.0 / React 19.3.0)
docker compose up -d --build lab
python3 poc.py http://127.0.0.1:3100 --cmd 'id; uname -a'

# 2. patched lab (Next.js 16.4.1 / React 19.3.1) — must fail
docker compose --profile patched up -d --build lab-patched
python3 poc.py http://127.0.0.1:3101 --cmd 'id'

PoC options

FlagDefaultPurpose
--cmdidcommand executed by the hijacked Server Action
--path/page hosting the cached function
--action-idautoskip discovery, provide the 40–64 hex id
--chunk-id / --overread4 / 8192resume-offset tuning
--scanoffsweep chunk ids × overread sizes
--timeout / --insecure30 / offHTTPS targets

Lab UI

The lab page itself (http://127.0.0.1:3100/) is a small dark-themed console: decode-result panel with status tag, operator diagnostics button whose output is rendered on-page, and the annotation contract in the empty state. It exists so the Server Action id ships in public HTML exactly like a real app — the same property the PoC's discovery step relies on.


Verified results

TargetResult
lab 16.4.0 / 19.3.0 (Docker)uid=1000(node) + uname -a + arbitrary --cmd output rendered in page — RCE confirmed
lab 16.4.1 / 19.3.1 (Docker)annotation stays opaque Uint8Array(8278), no action invocation — attack fails
native run (same runtime as image)identical differential — reproduces outside Docker

Remediation

  • Upgrade react-server-dom-* to 19.0.9 / 19.1.10 / 19.2.9 / 19.3.1 and Next.js to >= 16.4.1.
  • Do not return multiple views over one ArrayBuffer from use cache functions; copy views into separate buffers (.slice()).
  • Keep Server Actions behind capability checks; treat action ids as routing, not authorization.

Credit

  • Vulnerability: React security team advisory GHSA-xqc2-xf4c-x3h3 / CVE-2026-126187 (finder: evolutionstorm)
  • Independent reproduction & package: codewithwan (TahuCryptsi)
Download Tool