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-108551-POC — Defense guide + static scanner for CVE-2026-108551 (openapi-typescript-codegen code injection). | Kitploit
Tools/GitHubGitHub/zombie-kaiser/cve-2026-108551-poc
Defensive ToolsStatic AnalysisWeb Vulnerability ScannersVulnerability AnalysisCode AnalysisDevSecOpsSupply Chain SecurityLearning & Education
Share
GitHub
zombie-kaiser/cve-2026-108551-poc

CVE-2026-108551-POC

Defense guide + static scanner for CVE-2026-108551 (openapi-typescript-codegen code injection).

View Repository
111 month agoNot yet reviewed

CVE-2026-108551 — openapi-typescript-codegen Code Injection

CVSS 9.8 Critical

  • CVE: CVE-2026-108551
  • CVSS v3.1: 9.8 Critical — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • CVSS v4.0: 9.3 Critical
  • CWE: CWE-94 Code Injection
  • Vendor / product: ferdikoomen / openapi-typescript-codegen (npm)
  • Affected: <= 0.31.0
  • Fixed: None. Latest release is 0.31.0; issue #2809 is still open (2026-10-23).
  • Patch status: Unpatched
  • Public exploit: None public. The reporter states a PoC is available on request. This repository includes a non-weaponized, educational PoC (benign marker file only) alongside the detection tooling.

Summary

Spec-derived values (path keys, parameter names, servers[0].url, info.version, media types, response header names) are interpolated into single-quoted string literals in generated TypeScript without escaping. A single quote in an attacker-controlled OpenAPI document can break out of the literal and inject JavaScript that runs at import time (via core/OpenAPI.ts) or when a generated service method is called.

The victim is the developer or CI pipeline that generates or runs a client from an untrusted or attacker-influenced OpenAPI description. This is a supply-chain / developer-tooling issue, not a remotely reachable server bug.

Proof of concept (educational, non-weaponized)

poc/ contains a self-contained demonstration of import-time execution. A crafted info.version breaks out of the single-quoted literal in core/OpenAPI.ts and runs JavaScript when the generated client is imported. The payload is deliberately harmless: it writes poc-executed.txt and prints a message. It makes no network calls and accesses no secrets.

cd poc
powershell -ExecutionPolicy Bypass -File .\run-poc.ps1

Expected output includes:

[CVE-2026-108551] payload executed: poc-executed.txt written
[+] PoC CONFIRMED: attacker-controlled spec code ran at import time.

See poc/README.md for the mechanism, requirements, and safety notes. Run it only in a disposable sandbox. The same injection class also affects request paths, parameter names, media types, response header names, and servers[0].url.

How to defend

1. Identify exposure

  • Search package.json and lockfiles for openapi-typescript-codegen and any version <= 0.31.0.
  • Find CI/CD jobs and local scripts that run the generator (openapi, npx openapi-typescript-codegen, npm run generate, etc.).
  • Identify every source of OpenAPI documents: checked-in files, downloaded specs, URLs fetched at build time, or specs contributed by third parties.
  • Assume any spec you do not fully control is executable input.

2. Remediate

There is no fixed release yet. Options, in order of preference:

  1. Remove the dependency and migrate to a maintained generator such as @hey-api/openapi-ts (upstream's own recommendation).
  2. Vendor and pin every OpenAPI document; review and hash it before generation.
  3. Watch the fix at https://github.com/ferdikoomen/openapi-typescript-codegen/issues/2809 and upgrade as soon as a patched release exists.

3. Compensating controls

  • Treat OpenAPI documents as source code: require review, pin by commit/hash, and fetch only from trusted, authenticated sources.
  • Run generation in an ephemeral sandbox/CI job with no secrets, a read-only token, and restricted egress.
  • Diff and review generated output before committing or importing it.
  • Never import freshly generated clients in a privileged process before review.
  • Keep npm ci/lockfiles immutable and monitor dependency changes (Dependabot, Renovate, SBOM).

4. Detection and monitoring

Run the included static scanner over generated output before importing it:

python scripts/scan_generated.py .\generated

The scanner looks for unescaped quotes/metacharacters in generated url, BASE, and VERSION literals. It never imports or executes the files.

Also monitor CI for:

  • Unexpected network calls during generation or test steps.
  • Unexpected changes in generated files outside the expected diff.
  • Access to CI secrets from the generation job.

5. Verify the fix

python scripts/version_check.py 0.31.0
# AFFECTED -> migrate/remove
python scripts/scan_generated.py .\generated
# No suspicious unescaped literals found.

6. If you suspect compromise

Rotate every secret available to the CI job or developer environment, rebuild from a clean checkout, audit generated clients and published packages for injected code, and review outbound traffic from the build runner.

Repository contents

  • data/cve.json — affected range and references.
  • scripts/version_check.py — offline version checker.
  • scripts/scan_generated.py — static, non-executing generated-code scanner.
  • poc/malicious-openapi.json — crafted spec used by the educational PoC.
  • poc/run-poc.ps1 / poc/run-poc.sh — reproducible, non-weaponized PoC harness.
  • poc/README.md — PoC mechanism and safety notes.
  • DISCLAIMER.md — authorized, educational use only.

References

  • Tracking issue — https://github.com/ferdikoomen/openapi-typescript-codegen/issues/2809
  • VulnCheck advisory — https://www.vulncheck.com/advisories/openapi-typescript-codegen-through-0.31.0-code-injection-via-handlebars-templates
  • CVE record — https://www.cve.org/CVERecord?id=CVE-2026-108551
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.

    894
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    821
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

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

    450
  • 5

    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.

    437
  • 6

    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.

    389

Explore all tools

Browse our collection of tools

View all tools →