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-102422 — Proof-of-concept reproducing CVE-2026-102422, a command injection in shell-quote's quote() via line terminators after comment tokens, with vulnerable and patched snapshots. | Kitploit
Tools/GitHubGitHub/devvaibhav07/cve-2026-102422
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPayload Development
GitHubdevvaibhav07/cve-2026-102422

CVE-2026-102422

Proof-of-concept reproducing CVE-2026-102422, a command injection in shell-quote's quote() via line terminators after comment tokens, with vulnerable and patched snapshots.

View Repository
1 month agoNot yet reviewed

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.

    915
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    891
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    678
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    454
  • 5

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    404
  • 6

    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.

    388

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-102422 POC

Proof of concept for GHSA-pqg4-j6r4-53mv / CVE-2026-102422: a command injection in shell-quote's quote() via a line terminator in a token that follows a { comment } token.

  • Package: shell-quote (npm)
  • Affected versions: >= 1.8.4, < 1.11.0
  • Patched in: 1.11.0
  • Severity: High (CVSS 3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H)
  • Weakness: CWE-78 — OS Command Injection

This repo reproduces the bug locally and shows the official fix blocking it. It does not target any live service — it calls the quote() function directly with two bundled snapshots of quote.js: the pre-fix version and the patched version.

Root cause

quote() renders a { comment: 'x' } token as #x, which comments out the rest of the shell line it's part of — including the opening quote of any later string token. If that later string contains a line terminator (\n, \r, U+2028, or U+2029), the terminator ends the # comment early, and the remainder of the string is parsed as live shell syntax:

quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#']);
// => "echo ok #x 'a\nid;#'"

Passed to sh, bash, dash, ksh, or zsh, this runs id.

parse() emits a comment token for a # in the middle of a word too (e.g. http://example.com/#frag), so any caller combining parse() output with another untrusted string — e.g. quote(parse(untrustedCommand).concat(untrustedArg)) — is reachable the same way, without ever constructing a { comment } token explicitly.

The original fix for CVE-2026-9277 only rejected line terminators inside the comment's own text, not in tokens that come after it. 1.11.0 closes that gap by rejecting a line terminator in any string token once a comment token has been seen.

Run it

node poc.js

Expected output: the vulnerable snapshot executes the injected id (proven by a marker file written to the OS temp dir), and the patched snapshot throws a TypeError for the same input.

--- 1) Vulnerable quote() (shell-quote < 1.11.0) ---
quote() output:
echo ok #x 'a
id > /tmp/.../shell-quote-poc-12345.marker;#'
ok
[VULNERABLE] injected `id` ran outside the quoted argument -> ... was created:
uid=501(...) gid=20(...) ...

--- 2) Patched quote() (shell-quote >= 1.11.0) ---
[PATCHED] quote() threw TypeError: a token after a `comment` must not contain line terminators

Files

  • vulnerable/quote.js — quote.js as it existed immediately before the fix commit (shell-quote < 1.11.0).
  • patched/quote.js — the current, patched quote.js (shell-quote >= 1.11.0).
  • poc.js — runs the same malicious call against both and reports the result.

Both snapshots are taken from the upstream shell-quote repository and carry its original MIT license/copyright (see LICENSE).

Remediation

Upgrade to [email protected] or later. If you can't upgrade immediately, per the advisory's workaround: drop every token after a { comment } token before calling quote(), or reject line terminators in untrusted strings before they reach it.

Credits

  • euriconicacio — finder
  • ljharb — maintainer, remediation
Download Tool