Mapping AI Dependencies, SDKs, and Frameworks
The framework and SDK stack behind an AI application determines which attack surfaces exist. LangChain applications expose different tool integration vulnerabilities than LlamaIndex ones. An application built on the Vercel AI SDK behaves differently from one using the OpenAI SDK directly. Identifying these dependencies before active testing lets you target the right attack techniques and avoid wasting time on techniques that do not apply to the stack in use.
Identify Frameworks from JavaScript Bundles
Frontend JavaScript bundles often contain AI SDK references, even when the actual API calls happen server-side. Extract all JS files and search for framework signatures:
langchain openai litellm
Framework names in the bundle confirm what the application is built on. langchain means agent and chain abstractions with tool calling. llamaindex means a RAG-heavy architecture. autogen or crewai means multi-agent systems. litellm means the application proxies multiple providers through a unified interface — which may mean API keys for multiple providers are accessible server-side.
Check Exposed Package Files
Misconfigured deployments sometimes expose package manifest files that list all dependencies including AI frameworks:
An exposed requirements.txt or package.json is a full dependency map. Note exact version numbers — outdated versions of AI frameworks often have known prompt injection or tool abuse vulnerabilities. Cross-reference against CVE databases and framework changelogs.
Identify Frameworks from Response Signatures
AI frameworks leave signatures in API response structures and error formats. Compare the response structure against known framework patterns:
Response field signatures by framework:
- LangChain — responses may include
run_id,intermediate_steps, oragent_scratchpadfields when verbose mode is accidentally enabled - LlamaIndex — responses sometimes include
source_nodeswith document metadata when debug logging leaks into responses - Vercel AI SDK — streaming responses use a specific line-prefix format starting with
0:,8:,d: - Haystack — pipeline responses include
answersarrays withdocument_ids
Enumerate Dependencies via Error Stack Traces
Triggering server errors sometimes returns stack traces that reveal the exact framework and version:
Check Python and Node Package Audit Data
If you have access to any exposed dependency files, audit them for known vulnerable AI framework versions:
Identify Orchestration Framework from Network Traffic
If you can observe network traffic from a position on the same network segment, AI framework calls to provider APIs follow recognisable patterns. Different frameworks use different default parameter sets and header combinations that act as fingerprints even when request content is encrypted.
In a lab or internal assessment context, capture outbound HTTPS traffic from the AI application server and compare the TLS SNI values against known AI provider domains:
api.openai.com api.openai.com api.openai.com
References
-
pypa/pip-audit on GitHubgithub.com/pypa/pip-audit (opens in new tab)
Python dependency vulnerability auditing for requirements.txt files
-
projectdiscovery/katana on GitHubgithub.com/projectdiscovery/katana (opens in new tab)
JavaScript-aware crawler for extracting SDK and framework references from bundles
Was this helpful?
Your feedback helps improve this page.