CVE-2026-132122: agentic-radar scans can leak your OpenAI API key to a malicious repository

A vulnerability in agentic-radar versions 0.7.0 through 0.14.1 allowed malicious code repositories to steal OpenAI API keys by controlling environment variables loaded at scan time. The flaw has been patched in version 0.14.2.

Christopher Ort
By Christopher Ort · 3 min read
Share
A developer's laptop screen showing a terminal window with a security warning, a coffee mug beside the keyboard, soft office lighting
Image: AI-generated, i10X
On this page
  1. Quick Take
  2. In plain English
  3. What happened
  4. What you should do
  5. What it means
  6. Sources
i10X Quick Take

Quick Take

  1. What: CVE-2026-132122 in agentic-radar, a security scanner for AI agent workflows, allowed malicious repositories to exfiltrate OpenAI API keys by injecting environment variables through a .env file.
  2. Affected: Versions 0.7.0 through 0.14.1, but only when the tool is installed inside a repository checkout (in-repo virtualenv or editable install).
  3. Fixed: Version 0.14.2 removes automatic .env loading; users must now pass --env-file explicitly.
  4. Action: Upgrade to 0.14.2 and review any repositories scanned with earlier versions for potential key exposure.
  5. Severity: CVSS 7.4 High (per the researcher’s assessment), though NVD lists 4.7 Medium.

In plain English

Agentic-radar is a developer tool that scans AI agent code for security issues. A bug in versions 0.7.0 to 0.14.1 meant that when you scanned a repository, the tool would automatically load a .env file from that repository. A malicious repository could use this to redirect your OpenAI API requests to an attacker’s server, stealing your API key in the process. The fix in version 0.14.2 stops the tool from loading .env files automatically.

What you should do: If you use agentic-radar, upgrade to 0.14.2. If you don’t develop AI agent systems or use this tool, you can ignore this issue.

What happened

Agentic-radar is an open-source security scanner for AI agent workflows published by splx-ai. The tool’s CLI module called load_dotenv() at import time without specifying a path. The bundled python-dotenv library searches upward from the installed package directory for a .env file, so when agentic-radar was installed inside a repository checkout (a common pattern for the project’s own examples), it would load environment variables from the scanned repository’s .env file.

The scan openai-agents command constructs an openai.OpenAI() client without validating the OPENAI_BASE_URL environment variable. A malicious repository could include a .env file setting OPENAI_BASE_URL to an attacker-controlled host. When the scan ran, chat completion requests carrying the user’s OpenAI API key in the Authorization: Bearer header would be sent to the attacker’s server.

The vulnerability was reported by security researcher Teycir on November 12, 2026. The researcher provided a proof-of-concept demonstrating that a .env file in an empty directory with OPENAI_BASE_URL pointing at a local test server caused the tool to send requests with the user’s API key to the specified host.

The affected range is versions 0.9.1 through 0.14.1. Version 0.9.1 was the first release with both the import-time .env load and an unconditional LLM call in the analyzer. Versions 0.7.0 through 0.8.x are not affected for the scan openai-agents command because the only chat completion call was behind an explicit --enhance-prompts flag. Installations outside the scanned repository (pipx, system-wide, or standalone virtualenv) are not affected because the upward search never reaches the repository’s .env file.

What you should do

Upgrade to agentic-radar 0.14.2 or later. The fix removes the import-time load_dotenv() call. Environment files are now loaded only when passed via --env-file (or the AGENTIC_RADAR_ENV_FILE environment variable) on the scan or test commands, with override=False so existing environment variables take precedence.

If you used versions 0.9.1 through 0.14.1 to scan untrusted repositories with an in-repo virtualenv or editable install, review those repositories for malicious .env files and rotate your OpenAI API keys if you find any.

The vendor also recommends passing --env-file .env explicitly or exporting variables directly rather than relying on automatic loading.

What it means

This vulnerability highlights the risks of automatic configuration loading in security tools. When a tool designed to analyze untrusted code automatically loads configuration from that code, it creates an opportunity for the analyzed code to influence the tool’s behavior.

The researcher assigned a CVSS 3.1 score of 7.4 (High) with the vector AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N, reflecting high confidentiality impact due to API key exfiltration. The NVD entry lists a CVSS score of 4.7 (Medium), though the specific vector is not stated in the sources.

The fix addresses the primary issue (RT-01 in the researcher’s report) but two other issues remain unfixed in 0.14.2: an UnboundLocalError crash on unparsable Python files (RT-02) and an XSS vulnerability in HTML report generation (RT-03). These are library-only issues and do not involve credential theft.

The vulnerability was submitted to VulDB and VulnCheck as CNAs. The researcher noted that GitHub private vulnerability reporting was disabled on the upstream repository at the time of disclosure.

Leaked LLM provider keys are a recurring theme: see our reports on Jet Admin exposing .env credentials through prompt injection and pgEdge RAG Server leaking LLM API keys. New cases are tracked in our AI Security hub.

Sources

  • NVD CVE-2026-132122
  • Researcher disclosure repository
  • agentic-radar GitHub repository
  • Fix commit b99bb14
  • Pull request #134
  • Release v0.14.2
Christopher Ort

Christopher Ort

Christopher Ort handles SEO, AI agent workflows and PR & partnerships at i10x.ai, the all-in-one AI workspace built by i10X Global Pte. Ltd. in Singapore. He is a graduate of Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU). He is the author of “The Style Penalty”, a study published on SSRN that analyses 1,576 evaluation decisions by four frontier AI models to show how AI-written CVs fare in automated hiring screens; the research has been covered by heise online and t3n.

Editor's picks

  1. CVE-2026-132121: Any website can hijack a local Supergateway and run your MCP tools
  2. CVE-2026-132122: agentic-radar scans can leak your OpenAI API key to a malicious repository
  3. CVE-2026-119220: Dokan MCP endpoint regex flaw lets attackers bypass WooCommerce permissions
  4. Reflection AI Gates Laser, Its Autonomous Penetration Testing Agent, Behind a Trusted Access Program
  5. BrightAI Raises $97 Million to Replace Scheduled Infrastructure Inspections With Physical AI