AppSec

Stop Treating LLM Agents as Trusted Users: Lessons from GitLab CVE-2021-39935

CISA added CVE-2021-39935 to the KEV catalog in February 2026. LLM agents with broad API access inherit every vulnerability in your attack surface.

CISA added CVE-2021-39935 to the KEV catalog on February 3, 2026 - a 2021 GitLab SSRF vulnerability now seeing active exploitation. The federal remediation deadline is February 24, 2026. This is worth examining not because it's novel (GitLab patched it in October 2021), but because the threat model around CI/CD attack surfaces has fundamentally changed with the deployment of LLM agents that interact with development infrastructure.

CVE-2021-39935 is a Server-Side Request Forgery (CWE-918) in GitLab CE/EE's CI Lint API, affecting versions 10.5 through 14.3.5, 14.4.0 through 14.4.3, and 14.5.0 through 14.5.1. Patched versions are 14.3.6, 14.4.4, and 14.5.2 respectively. The vulnerability allows unauthenticated attackers to force the GitLab server to make arbitrary HTTP requests - typically exploited to access cloud instance metadata (AWS IMDS, GCP metadata, Azure IMDS) or internal services.

The AI security angle: many organizations now have LLM-based coding assistants, CI/CD agents, or autonomous DevOps tools that interact with GitLab APIs - often with elevated permissions to "validate configs," "lint pipelines," or "fetch repository data." If an attacker achieves prompt injection against one of these agents (OWASP LLM01), they can potentially direct the agent to interact with vulnerable endpoints like the CI Lint API. The SSRF then becomes a capability multiplier: what starts as "trick the LLM into making a bad API call" escalates to "extract IAM credentials from instance metadata" or "reach internal package registries."

This isn't speculation - it's the inevitable consequence of deploying agents with network access over legacy attack surfaces. The GitLab SSRF was already dangerous in 2021. In 2026, it sits downstream of every LLM tool that has gitlab-api in its function library. The blast radius compounds.

The secure-by-design principle here is to stop treating AI agents as trusted operators. When threat modeling LLM integrations with CI/CD systems, model the agent as an untrusted external user - because prompt injection gives attackers exactly that level of control. Apply defense-in-depth: network egress allowlists (deny-by-default), block access to cloud metadata endpoints from build runners, treat "convenience APIs" like CI Lint as privileged surfaces requiring authentication and rate limiting, and assume your agent will eventually be compromised. The architecture should survive that assumption.

CVE-2021-39935 GitLab Security Release: 14.4.1,14.3.4, and 14.2.6 OWASP LLM01:2025 Prompt Injection

All articles