/

CVE-2026-77271

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in MCP Atlassian Attachments

CVE-2026-77271

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-94

Impact:

Arbitrary File Overwrite and Potential Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MCP Atlassian versions before 0.22.0 contain a path traversal weakness in Confluence attachment handling because some call sites omit the intended base directory. An attacker who can influence an attachment destination may write files within the server's working directory, potentially enabling code execution if a modified Python module is later imported.

Affected context

The issue occurs in MCP Atlassian deployments using affected Confluence attachment operations before the secure path-validation behavior is applied. The validation helper defaults its base directory to the process working directory, while certain callers do not provide an explicit base directory. The risk depends on whether an attacker can cause an attachment to be written to a selected relative or nested path and whether the service account can modify sensitive files.

Exploit preconditions

  • Attack surface: Confluence attachment file-writing functionality exposed through the MCP server
  • Required access: Ability to invoke the affected attachment operation and influence the destination filename or path; the exact access level depends on Atlassian and MCP authorization controls
  • Trigger point: Attachment download or write processing
  • Why exploitation is possible: Path validation uses the current working directory as a fallback, and affected call sites omit an explicit trusted base directory, allowing attacker-selected writes within that location
  • Code execution condition: A writable Python module or other executable application resource must later be imported or executed by the process

Why this happens

The underlying bug is inconsistent enforcement of a trusted path boundary. A path-validation helper permits the process working directory to become the effective base directory when callers omit an explicit base path. This allows attacker-controlled attachment paths to resolve to unintended files within that directory. The behavior maps primarily to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, and may lead to CWE-94 when an overwritten module is subsequently loaded as executable code.

Potential impact

  • Sensitive application files may be overwritten
  • Python modules or configuration files may be modified
  • The MCP server process may execute attacker-controlled code after a modified module is imported
  • Application data, credentials, or connected Atlassian resources could be exposed
  • The service account or surrounding environment may be compromised

General mitigation guidance

Mitigation generally focuses on making trusted directory boundaries explicit

and enforcing them consistently at every file-writing call site.

Common defensive patterns include:

  • Require an explicit, fixed base directory for attachment storage
  • Canonicalize and validate resolved paths before writing
  • Reject traversal components, unexpected absolute paths, symlink escapes, and path-sensitive encodings
  • Use dedicated non-executable storage locations for downloaded content
  • Apply strict filename and extension allowlists where practical
  • Run the service with least-privilege filesystem permissions and a read-only application installation
  • Separate writable data directories from imported code and configuration
  • Treat attachment metadata and filenames as untrusted input

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying path-validation helpers with implicit current-directory defaults
  • Code review checks ensuring every file-writing call supplies an explicit trusted base directory
  • Tests covering relative paths, absolute paths, traversal sequences, symlinks, and normalization edge cases
  • Runtime monitoring for writes outside the designated attachment directory
  • File-integrity monitoring for changes to Python modules, configuration files, and application resources
  • Policy enforcement that prevents service identities from writing to executable code locations

Automated security review tools may help identify inconsistent path-boundary enforcement, but findings should be validated against deployment-specific authorization and filesystem behavior.

Sources

SourceLink
github.comgithub.com/sooperset/mcp-atlassian/commit/b041733473f95119dd539542a43c280737a8e460
github.comgithub.com/sooperset/mcp-atlassian/pull/1448
github.comgithub.com/sooperset/mcp-atlassian/releases/tag/v0.22.0
github.comgithub.com/sooperset/mcp-atlassian/security/advisories/GHSA-6vmq-24h2-pj7j

Frequently asked

questions

It may be exploitable through the MCP server's attachment functionality when that

functionality is network-accessible and an attacker can invoke it and influence

the destination path. Authentication and authorization requirements depend on

the deployment.

The attacker generally needs access to an affected Confluence attachment operation

and control over relevant attachment path or filename data. The server process

must also have permission to write to the targeted location.

Use an explicit, dedicated, non-executable storage directory for every attachment

write, and validate the fully resolved path against that directory before writing.

Do not rely on the process working directory as an implicit security boundary.

Treat filenames and attachment metadata as untrusted, test path handling against

traversal and symlink cases, separate writable data from application code, and

enforce least-privilege filesystem permissions with file-integrity monitoring.

Find out what's already
exploitable in your codebase.