CVE-2026-77271
Path traversal allows attacker to overwrite Python modules for code execution.
- CVSS 8.3
- CWE-22
- Input Validation and Sanitization
- Remote
MCP Atlassian is a Model Context Protocol (MCP) server for Atlassian products (Confluence and Jira). Prior to 0.22.0, validate_safe_path defaults its base directory to os.getcwd(), and affected Confluence attachment call sites omit base_dir, allowing attacker-selected writes within the working directory. This Python module overwrite can provide code execution when the application later imports the modified module, bypassing the remediation tracked as CVE-2026-27825. This issue is fixed in version 0.22.0.
- CWE
- CWE-22
- CVSS base score
- 8.3
- Published
- 2026-09-22
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Path Traversal
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- MCP Atlassian
- Fixed by upgrading
- Yes
Solution
Upgrade MCP Atlassian to version 0.22.0 or later.
Vulnerable code sample
import os
from pathlib import Path
def validate_safe_path(target_path: str, base_dir: str = os.getcwd()):
# VULNERABLE: default base_dir allows writes to cwd
target = Path(target_path).resolve()
base = Path(base_dir).resolve()
if not str(target).startswith(str(base)):
raise ValueError("Unsafe path")
return target
def save_attachment(filename: str, data: bytes):
# Confluence call site that omits base_dir, inheriting the unsafe default
safe_path = validate_safe_path(filename)
with open(safe_path, "wb") as f:
f.write(data)Patched code sample
import os
from pathlib import Path
def validate_safe_path(target_path: str, base_dir: str):
# FIX: require explicit safe base_dir
target = Path(target_path).resolve()
base = Path(base_dir).resolve()
if not str(target).startswith(str(base)):
raise ValueError("Unsafe path")
return target
def save_attachment(filename: str, data: bytes):
# Explicitly restrict to the configured attachments directory
attachments_dir = "/var/atlassian/attachments"
safe_path = validate_safe_path(filename, base_dir=attachments_dir)
with open(safe_path, "wb") as f:
f.write(data)Cite this entry
@misc{vaitp:cve202677271,
title = {{Path traversal allows attacker to overwrite Python modules for code execution.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-77271},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-77271/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
