CVE-2026-41863: Spring AI: path traversal via LLM-chosen filenames

GHSA-cc4m-mp48-x7qg MEDIUM
Published May 26, 2026
CISO Take

Spring AI's integration with Anthropic's Skills API let the LLM choose output filenames that were passed unsanitized into Path.resolve(), so a crafted filename containing directory-traversal sequences could write files outside the intended workspace, including restricted system directories. This matters because it flips a common but risky trust assumption in agent frameworks — that LLM-generated strings are safe to use in filesystem operations — and the fix requires disciplined output handling, not just prompt hardening. Exploitation likelihood looks moderate rather than urgent: EPSS sits in the 68th percentile, there's no public exploit or Nuclei template, it's not in CISA KEV, and CISA's SSVC decision is TRACK, meaning it warrants monitoring but not emergency response. The 5,435 downstream Maven dependents show real reach across the Spring ecosystem, though only apps actually using the Anthropic Skills file-write feature are exposed. Patch to spring-ai-anthropic 1.1.7 or later; until then, review any code paths that let the LLM name files written to disk and confirm they're constrained to an allow-listed, non-traversable directory.

Sources: NVD GitHub Advisory spring.io security advisory EPSS ATLAS

What is the risk?

CVSS 6.5 (Medium) reflects High integrity impact with no confidentiality or availability loss — an attacker can write or overwrite files but not directly read data or crash the service. Attack complexity is low and no user interaction is required beyond the attacker's own low-privilege access to the application (PR:L), meaning any authenticated or otherwise permitted user of an app exposing this Skills API feature can attempt it. There is no evidence of active exploitation (not in CISA KEV, no public PoC, no Nuclei template), and CISA's SSVC decision of TRACK confirms this is not an emergency-response item. EPSS at the 68th percentile is unremarkable for a path-traversal bug of this kind — real but not high urgency. The package risk score of 31/100 is comparatively low, and the actual exposure is narrow: it only affects deployments that use Spring AI's Anthropic Skills API file-write capability, not all Spring AI users.

How does the attack unfold?

Malicious Prompt Submission
An attacker with access to the application (or via injected content) submits a prompt designed to make the LLM choose an output filename containing directory-traversal sequences.
AML.T0051.000
Unsanitized Path Resolution
The application passes the LLM-chosen filename directly into Path.resolve() without validating or stripping traversal sequences, invoking the Skills API's file-write tool.
AML.T0053
Arbitrary File Write
The resolved path escapes the intended workspace directory, and the application writes content to a location outside its sandbox, including potentially restricted directories.
Downstream Compromise
If the overwritten file is executable, scheduled, or trust-anchored (e.g., a cron entry or SSH authorized_keys), the attacker may leverage the write to achieve code execution or persistence on the host.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Anthropic Python maven >= 1.1.0, < 1.1.7 1.1.7
3.8K 6.4K dependents Pushed 2d ago 90% patched ~12d to patch Full package profile →

Do you use Anthropic Python? You're affected.

How severe is it?

CVSS 3.1
6.5 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 33% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Unchanged
C None
I High
A None

What should I do?

1 step
  1. Upgrade org.springframework.ai:spring-ai-anthropic to 1.1.7 or later immediately in any application using the Anthropic Skills API. If immediate patching isn't possible, add a compensating control at the tool-invocation layer: resolve the LLM-provided filename, canonicalize it, and explicitly verify the result is still a descendant of the intended base directory before writing (reject on failure rather than truncate). Run the Skills file-write feature under a dedicated, least-privileged OS user with write access limited to a single dedicated workspace directory (containers/chroot help here). Add detection for file writes from the Spring AI process that land outside the expected workspace path (file-integrity monitoring or EDR rules keyed to the app's working directory), and audit-log every filename the LLM proposes for review after the fact.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, Robustness and Cybersecurity
ISO 42001
Annex A.6.2 - AI system development lifecycle risk controls
NIST AI RMF
MEASURE 2.7 - AI system security and resilience are evaluated and documented
OWASP LLM Top 10
LLM05:2025 - Improper Output Handling

Frequently Asked Questions

What is CVE-2026-41863?

Spring AI's integration with Anthropic's Skills API let the LLM choose output filenames that were passed unsanitized into Path.resolve(), so a crafted filename containing directory-traversal sequences could write files outside the intended workspace, including restricted system directories. This matters because it flips a common but risky trust assumption in agent frameworks — that LLM-generated strings are safe to use in filesystem operations — and the fix requires disciplined output handling, not just prompt hardening. Exploitation likelihood looks moderate rather than urgent: EPSS sits in the 68th percentile, there's no public exploit or Nuclei template, it's not in CISA KEV, and CISA's SSVC decision is TRACK, meaning it warrants monitoring but not emergency response. The 5,435 downstream Maven dependents show real reach across the Spring ecosystem, though only apps actually using the Anthropic Skills file-write feature are exposed. Patch to spring-ai-anthropic 1.1.7 or later; until then, review any code paths that let the LLM name files written to disk and confirm they're constrained to an allow-listed, non-traversable directory.

Is CVE-2026-41863 actively exploited?

No confirmed active exploitation of CVE-2026-41863 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-41863?

Upgrade org.springframework.ai:spring-ai-anthropic to 1.1.7 or later immediately in any application using the Anthropic Skills API. If immediate patching isn't possible, add a compensating control at the tool-invocation layer: resolve the LLM-provided filename, canonicalize it, and explicitly verify the result is still a descendant of the intended base directory before writing (reject on failure rather than truncate). Run the Skills file-write feature under a dedicated, least-privileged OS user with write access limited to a single dedicated workspace directory (containers/chroot help here). Add detection for file writes from the Spring AI process that land outside the expected workspace path (file-integrity monitoring or EDR rules keyed to the app's working directory), and audit-log every filename the LLM proposes for review after the fact.

What systems are affected by CVE-2026-41863?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, LLM tool/function-calling pipelines, AI-assisted file generation and automation tooling.

What is the CVSS score for CVE-2026-41863?

CVE-2026-41863 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.40%.

What is the AI security impact?

Affected AI Architectures

agent frameworksLLM tool/function-calling pipelinesAI-assisted file generation and automation tooling

MITRE ATLAS Techniques

AML.T0051.000 Direct
AML.T0053 AI Agent Tool Invocation
AML.T0101 Data Destruction via AI Agent Tool Invocation

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: Annex A.6.2
NIST AI RMF: MEASURE 2.7
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

Spring AI's support for Anthropic's Skills API used LLM-influenced filenames unsanitized in Path.resolve before writing files to disk. This could allow a malicious user to write files outside the intended target directory, including restricted directories. Affected versions: Spring AI: 1.1.0 through 1.1.7

Exploitation Scenario

An attacker with normal access to an application built on Spring AI's Anthropic Skills integration — or an attacker who can inject content the LLM later processes — crafts a prompt instructing the assistant to save its output under a filename like '../../../../etc/cron.d/updater' or '../../.ssh/authorized_keys' instead of a normal name. Because the application passes whatever filename the LLM proposes straight into Path.resolve() without stripping traversal sequences, the file write lands outside the intended workspace directory. If the attacker can influence content into a location later executed, scheduled, or trusted by the host (a cron entry, an SSH key file, or a path served by a web server), this integrity-only file write can escalate into code execution or persistent access on the host running the Spring AI application.

Weaknesses (CWE)

CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

  • [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
  • [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Timeline

Published
May 26, 2026
Last Modified
June 30, 2026
First Seen
June 30, 2026

Related Vulnerabilities