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/n0n4m3x41/cve-2026-22738-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPapers & ResearchLearning & Education
GitHubn0n4m3x41/cve-2026-22738-poc

CVE-2026-22738-POC

Proof-of-concept exploit for CVE-2026-22738, a critical SpEL injection RCE in Spring AI SimpleVectorStore, demonstrating unauthenticated OS command execution.

View Repository
133507 months agoNot yet reviewed
Share

CVE-2026-22738 — SpEL Injection RCE in Spring AI SimpleVectorStore

CVSS CWE Status

Unauthenticated remote code execution via Spring Expression Language (SpEL) injection in SimpleVectorStore.similaritySearch().

Affected Versions

ArtifactVulnerableFixed
org.springframework.ai:spring-ai-core1.0.0 – 1.0.41.0.5
org.springframework.ai:spring-ai-core1.1.0-M1 – 1.1.31.1.4

Fix commit: ba9220b22383e430d5f801ce8e4fa01cf9e75f29


Vulnerability

SimpleVectorStore.similaritySearch() passes the caller-supplied filter key name verbatim into a SpEL template evaluated by StandardEvaluationContext. Because StandardEvaluationContext exposes the full JVM reflection API, an attacker can inject:

T(java.lang.Runtime).getRuntime().exec(...)

into the filter key to achieve unauthenticated OS command execution.

Bypass Details

Naïve injection does not work out of the box — two parser quirks must be navigated:

  1. Single-quote stripping — a key starting with ' is treated as a quoted string; the outer quotes are stripped, mangling the payload.
  2. Double-quote wrapper — wrapping the payload in "..." causes the parser to strip the outer double-quotes, leaving the inner SpEL expression intact as the key value passed to #metadata['<KEY>'].
  3. Empty metadata key — using #metadata[''] on both sides of the injected expression (instead of an undefined variable) avoids an unknown variable SpEL error while still triggering exec().

The resulting evaluated expression takes the form:

#metadata[''] + T(java.lang.Runtime).getRuntime().exec(new String[]{'/bin/bash','-c','<cmd>'}) + #metadata[''] == 'x'

Success Indicator

The HTTP response body will contain EL1030E — the SpEL runtime error:

operator ADD not supported between null and java.lang.ProcessImpl

This error is raised after exec() returns, confirming OS-level command execution without requiring an out-of-band callback.


Usage

Prerequisites:

pip install requests

Run the exploit:

python3 exploit.py [--target http://localhost:8082] [--wait]
image | Flag | Default | Description | |---|---|---| | `--target` | `http://localhost:8082` | Base URL of the vulnerable application | | `--wait` | off | Poll until the target is ready (useful after `docker compose up`) |

Docker Desktop (macOS/Windows): use host.docker.internal instead of 127.0.0.1 for callback payloads.


Exploit Steps

The PoC runs five sequential steps:

StepDescription
1Baseline check — confirm the endpoint is reachable and returns seeded data
2Blind SpEL probe — read java.version via T(java.lang.System) to confirm injection point
3RCE: touch /tmp/pwned_cve_2026_22738 inside the container
4RCE: write id / uname / hostname output to /tmp/rce_proof.txt
5Verify via docker exec — print proof file contents

Disclaimer

This proof-of-concept is provided for educational and authorized security testing purposes only. Do not use against systems you do not own or have explicit written permission to test.

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.

    696
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    499
  • 3

    ARTEX

    baarai/artex

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

    396
  • 4

    redforge

    cybersecurity91/redforge

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

    340
  • 5

    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.

    258
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    257

Explore all tools

Browse our collection of tools

View all tools →