Skip to content
KitploitKITPLOIT
उपकरणएक्सप्लॉइटब्लॉग
Log in
जमा करें
उपकरणएक्सप्लॉइटब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

फ़ीडसंपर्कगोपनीयता© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
cs440-langgraph-nosql-demo — Local classroom demo of NoSQL operator injection in LangGraph's MongoDBSaver (GHSA-98xf-r82g-9mhx / CVE-2026-48121). Fictional data only. | Kitploit
उपकरण/GitHubGitHub/decker757/cs440-langgraph-nosql-demo
Vulnerability AnalysisCode AnalysisWeb Application ExploitationLearning & EducationAPI SecurityDatabase SecurityLabs & Practice
GitHubdecker757/cs440-langgraph-nosql-demo

cs440-langgraph-nosql-demo

Local classroom demo of NoSQL operator injection in LangGraph's MongoDBSaver (GHSA-98xf-r82g-9mhx / CVE-2026-48121). Fictional data only.

रिपॉजिटरी देखें
10 दिन पहलेअभी तक समीक्षित नहीं
साझा करें
अनुरोधित भाषा में सामग्री उपलब्ध नहीं है। अंग्रेज़ी संस्करण दिखाया जा रहा है।

CS440 · NoSQL Injection in LangGraph's MongoDBSaver

A small, local, browser-based demonstration of a real, published security advisory: unvalidated checkpoint identifiers in the LangGraph MongoDBSaver integration let an attacker smuggle a MongoDB query operator into an identifier field and read another user's saved conversation.

  • Advisory: GHSA-98xf-r82g-9mhx / CVE-2026-48121 (https://github.com/langchain-ai/langgraphjs/security/advisories/GHSA-98xf-r82g-9mhx)
  • Related issue: #2351 (https://github.com/langchain-ai/langgraphjs/issues/2351)
  • Vulnerable package: @langchain/[email protected]
  • Patched package: @langchain/[email protected]

Everything runs on your own machine with fictional Alice and Bob data only. No external targets, real accounts, cloud services, or API keys.

This is an integration flaw, not a flaw in MongoDB's query engine. MongoDB is one optional storage backend for LangGraph checkpoints. The bug is that the saver built a query straight from caller-supplied identifier fields without checking they were strings. This is not prompt injection: the attack enters the identifier fields, never the chat message.


What the demo shows

The screen is laid out to be read from the back of a room. For every trial it reveals, left to right:

  1. What Alice sends: the actual submitted identifiers (configurable).
  2. What MongoDB is asked: the actual query, captured live through the driver's command monitoring, with a plain-English reading of it. Or, if the request was rejected, a clear statement that nothing reached MongoDB.
  3. What Alice gets back: the actual restored state, or the actual error.

Below those, In the database shows the two stored chats and which ones the query matched, and Results so far builds up a comparison of every trial.

#TrialVersionthread_id sentOutcome
1Normal request1.3.0 vulnerable"alice-thread"Returns Alice
2Injection attack1.3.0 vulnerable{ "$gt": "" }Returns Bob
3Same attack, patched1.3.1 patched{ "$gt": "" }Rejected before any lookup
4Normal request, patched1.3.1 patched"alice-thread"Returns Alice (fix is not over-broad)
5Bob's real ID, patched1.3.1 patched"bob-thread"Returns Bob (the patch checks types, not ownership)

Trial 5 is not a LangGraph bug. It shows what a type check cannot do: the ID is valid text, so deciding whether Alice may read it is the application's job.


Prerequisites

  • Node.js >= 22 (node --version)
  • Docker Desktop running (for the local MongoDB container)
  • A bash shell for setup.sh: macOS, Linux, or Windows with Git Bash or WSL. The npm run commands also work from PowerShell.

Install dependencies once with npm install.

The two saver versions are installed side by side as npm aliases (see package.json):

"mongodb-saver-vulnerable": "npm:@langchain/[email protected]",
"mongodb-saver-patched":    "npm:@langchain/[email protected]"

Exact commands

./setup.sh          # start: check prereqs, start MongoDB, seed the data, serve the UI
./setup.sh test     # run the five trials as integration tests
./setup.sh logs     # show MongoDB's own log of each trial's query (add -f to follow)
./setup.sh stop     # stop and remove ONLY this demo's MongoDB container + volume

Then open: http://127.0.0.1:4400. You should see "Local server ready" at the top right. Press Ctrl+C to stop the web server.

Without bash, the same steps are npm run db:up, npm start, npm test, and npm run db:down. These use this project's Compose file (compose.yaml, project name cs440-nosql-demo) and touch only this demo's container and volume.


Running the trials

Alice is the simulated requester. The chat message is always the literal text Continue my chat. Only the identifier fields change between trials. Click the numbered buttons in order, 1 to 5.

A trial finishes in milliseconds, so the page reveals the finished result one panel at a time, about a second apart. That pause is display pacing only, not query time.

Reset re-seeds the fictional data (Alice first, Bob last) and clears the results table. Download evidence saves the last run as JSON. Every run is also appended to evidence/runs.jsonl.

Why Bob comes back in Trial 2

{ "$gt": "" } means "any non-empty thread_id", which broadens Alice's lookup to every stored thread. The saver then applies .sort("checkpoint_id", -1) and .limit(1), both visible in the captured query, so it returns the single newest checkpoint. Bob is seeded last, so that checkpoint is Bob's.

Important nuance: a broadened lookup returns the latest matching checkpoint, not every record and not an arbitrarily chosen victim.


Plain-English: thread_id and checkpoint_ns

LangGraph can save the state of a conversation so it can be restored later. Each saved snapshot is a checkpoint. To find the right checkpoint, the saver looks it up by a few identifier fields you pass in config.configurable:

  • thread_id: which conversation. Normally a plain string such as "alice-thread".
  • checkpoint_ns: checkpoint namespace. A sub-label used to separate checkpoints within one conversation. For a simple top-level chat it is "".
  • checkpoint_id (optional): which exact snapshot. If you don't provide one, the saver returns the latest checkpoint for that thread.

Version 1.3.0 dropped these values straight into a MongoDB filter. MongoDB treats a field whose value is an object like { "$gt": "" } as an operator, not as a literal id. Version 1.3.1 rejects any identifier field that is not a string.


How faithful is this? (what actually runs)

  • Real LangGraph. Seeding calls graph.invoke(...) on a compiled StateGraph, and each trial calls graph.invoke(...) again: the real restoration path that internally calls the saver's getTuple.
  • Real, unmodified saver source. The two saver versions are the actual published 1.3.0 and 1.3.1 packages, loaded via npm aliases.
  • Real captured query. The query shown is captured from the Node driver's commandStarted monitoring event.
  • Deterministic node, clearly labelled. The single graph node returns a fixed canned reply and never calls an LLM. This keeps trials reproducible.

Disclosed simplifications:

  • During a trial the saver is wrapped so that writes (put / putWrites) are suppressed while reads (getTuple / list) run the real, unmodified code. This keeps the seeded data identical between runs. Seeding uses the fully unwrapped saver, so the stored checkpoints are written by the genuine saver. See src/saver.js (readOnly) and src/demo.js.
  • The trial buttons choose one of three preset identifier sets (src/fixture.js), which go straight into the real graph.invoke. The demo does not expose a free-form public endpoint. An app that forwards client-supplied IDs without checking them is the affected scenario the advisory describes.
  • The In the database strip comes from separate read-only aggregates, not from the saver. They are not find commands, so they appear in neither the captured query nor the rows of ./setup.sh logs.

Database-side evidence (MongoDB's own log)

The query panel shows the command the app captured. For evidence that does not rely on the app's own word, compose.yaml starts mongod with --slowms 0, so it logs every operation, and this prints those log entries:

./setup.sh logs        # each trial's checkpoint query
./setup.sh logs -f     # follow live

Lookups from seeding return nothing and are counted but not listed.

टूल डाउनलोड करें

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 अंतिम OSINT टूलकिट: जाँच ग्राफ़, विश्वास स्कोरिंग, उपनाम परिवार, मानचित्र, टाइमलाइन और रिपोर्ट। 49 मॉड्यूल, 400+ साइटें, किसी API कुंजी की आवश्यकता नहीं।

    591
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # घोस्टलॉक वन-टैप निष्पादन ऐप (CVE-2026-43499)

    481
  • 3

    ARTEX

    baarai/artex

    प्लानर/वर्कर एजेंट, एसेट और एक्सप्लोरेशन ग्राफ़, MITM ट्रैफ़िक रिकॉर्डिंग, और भेद्यता पुनःपरीक्षण के साथ LLM मल्टी-एजेंट स्वायत्त पेनेट्रेशन टेस्टिंग प्लेटफ़ॉर्म।

    389
  • 4

    redforge

    cybersecurity91/redforge

    ब्राउज़र-साइड रेड टीम टूलकिट, जिसमें रेकॉन, पेलोड जनरेशन, क्रेडेंशियल हमलों, क्रिप्टो, एन्कोडिंग और एंगेजमेंट रिपोर्टिंग के लिए 102 ऑफ़लाइन टूल्स हैं।

    332
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI-मूल साइबरसुरक्षा के लिए कार्रवाई की प्रणाली—जहाँ इरादा नियंत्रित निष्पादन बन जाता है, साक्ष्य परिचालन स्मृति बन जाता है, और हर ऑपरेशन अगले को बेहतर बनाता है।

    255
  • 6

    antifox

    antifox-ai/antifox

    AI मल्टी-एजेंट स्वायत्त पेनेट्रेशन टेस्टिंग प्लेटफ़ॉर्म जो रेकॉन, अटैक-सरफ़ेस डिस्कवरी, एक्सप्लॉइटेशन वैलिडेशन और साक्ष्य-आधारित रिपोर्ट डिलीवरी संचालित करता है।

    247

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →