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/federiconbaez/cortex9-shell-quote-comment-line-terminator-model
Static AnalysisVulnerability AnalysisCode AnalysisWeb SecurityPapers & ResearchLearning & EducationLabs & Practice
GitHub
federiconbaez/cortex9-shell-quote-comment-line-terminator-model

cortex9-shell-quote-comment-line-terminator-model

Offline educational model of CVE-2026-102422 (shell-quote comment line terminator)

View Repository
15 days agoNot yet reviewed
Share

cortex9-shell-quote-comment-line-terminator-model

Offline, inert model of CVE-2026-102422 (GHSA-pqg4-j6r4-53mv, CWE-78) in the npm package shell-quote >= 1.8.4, < 1.11.0. quote() emits a { comment } token as #text, which comments out the rest of the shell line, including the opening quote of a later string token. A newline in that later string ends the comment, and the rest of the string is read as shell input. The fix, commit 6002b2ed90c6b83095eb272b6b0adaf3a172b0bc (in 1.11.0, see evidence/fix-in-v1.11.0.md), throws a TypeError for a line terminator in any string after a comment.

Spanish: README.es.md. Exercises: PRACTICE.md.

The model

  • src/model.js quote(tokens, 'pre'|'post'): the sawComment flag (diff L39, L51) and the new check (L41-43), plus the earlier comment-text check (L48-50, context; the fix for CVE-2026-9277). String quoting is a reduced stand-in (safe words as-is, else '...'); see LIMITATIONS.
  • posixCommands(text): counts the commands a POSIX sh would see in the emitted text (quotes, backslash, word-start # comments, \n ; & |). No shell is ever run; tests check that child_process is never used.
  • Outcomes: EXTRA_COMMAND (text after the comment becomes a new command), ONE_COMMAND, THROWS, UNTERMINATED_QUOTE.

Differential evidence (results/summary.csv)

Classnpre: extra commandpost: extra commandpost: throws
pos (\n after a comment)3303
hardening (\r, U+2028, U+2029)3003
neg (unchanged)6001 (same as pre)

p01 is the GHSA example: ["echo","ok",{comment:"x"},"a\nid;#"] gives echo ok #x 'a / id;#' before (two commands; the harmless id is the GHSA's own) and a TypeError after. The ;# matters: without it the trailing quote is left open (UNTERMINATED_QUOTE).

Honest nuance. In POSIX sh only \n ends a line; \r, U+2028 and U+2029 are ordinary characters, so the model shows no extra command for them. The fix rejects them anyway; they are classed as hardening.

Run (Node 20+, Python 3.10+, nothing installed)

node --test test/*.test.js
python3 scripts/derive_expected.py | diff - fixtures/expected.tsv
node scripts/gen_results.js /tmp/r && diff -r results /tmp/r

fixtures/expected.tsv comes from scripts/derive_expected.py, an independent, line-oriented Python derivation that does not read src/model.js.

A model is not a finding. See LIMITATIONS.md and SOURCES.md. License: Apache-2.0.

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 →
Download Tool