Oct 2, 2026·6 min read·27 visits
A vulnerability in Composer allows malicious dependencies or manipulated installed.json files to bypass binary path validation. This enables attackers to execute chmod operations or create execution proxies targeting sensitive files outside the package installation directory.
CVE-2026-59944 is a path traversal and link-following vulnerability in Composer, the PHP dependency manager. This flaw allows malicious or compromised packages to bypass previous path-hardening protections and perform arbitrary filesystem operations outside of their designated installation directory, leading to unauthorized permission modifications or execution proxy creations.
Composer is the standard dependency manager for the PHP programming language. It is responsible for downloading packages, resolving dependencies, and preparing the execution environment. This environment often includes generating binary command-line proxies in the vendor/bin directory. This directory is typically included in the host system's PATH variable to allow easy command execution.
To ensure packages can expose command-line utilities, Composer parses the bin configuration array inside each package's composer.json file. This parsing creates file shortcuts or symlinks within vendor/bin. It also attempts to make these binary files executable using the chmod operation. The code paths executing these operations are critical attack surfaces because they manage filesystem writing and permissions.
The vulnerability designated as CVE-2026-59944 represents a bypass of previous directory traversal defenses. A malicious package can exploit improper link resolution or pre-resolved metadata. This allows it to target paths outside the intended installation scope. This technical analysis explores the exact mechanics of the vulnerability, its root causes, and how it was resolved in Composer 2.2.30 and 2.10.3.
To understand the root cause of CVE-2026-59944, one must review the original mitigation for CVE-2026-59946. That mitigation relied on ValidatingArrayLoader::validatePackage() to block any binary path containing double-dot (..) segments. While this blocked literal directory traversal during initial package resolution, it failed to address two critical code execution pathways.
The first pathway is the handling of package files that are physical symbolic links. An attacker can construct a valid package containing a symbolic link at bin/exploit that points outside the package directory. The composer.json file declares the binary path literally as bin/exploit, which contains no directory traversal segments. During initial resolution, the path passes validation. However, during installation, the filesystem extraction writes this physical symbolic link to the disk.
The second pathway involves the restoration or regeneration of package metadata from local sources. When Composer runs a reinstall or executes ensureBinariesPresence(), it reconstructs binaries using vendor/composer/installed.json rather than re-solving the original packages. This localized loading pathway skips the ValidatingArrayLoader checks. If an attacker can write to the installed.json metadata via a shared caching mechanism or a lower-trust build stage, they can insert arbitrary traversal paths directly into the metadata.
Ultimately, both pathways fail because Composer historically performed filesystem operations directly on paths without canonicalizing them first. The program failed to verify that the target of the symbolic link or the path defined in installed.json resolved to a location within the package's install directory. This missing validation allowed the operations to escape the restricted directory boundary.
The vulnerability manifests across two critical components of Composer: FileDownloader.php and BinaryInstaller.php. In vulnerable versions, FileDownloader executed chmod on paths parsed from the package binaries list. The program assumed that the file target was a safe local file. It did not verify whether the file was a physical symbolic link pointing to a system file outside the directory.
The following Mermaid diagram outlines the verification logic that Composer introduces in the patched versions:
In the patch, Composer introduces a physical path containment validation helper isBinPathInsidePackage within BinaryInstaller.php. This helper enforces canonicalization using PHP's native realpath() function:
public static function isBinPathInsidePackage(string $installPath, string $binPath): bool
{
$realBinPath = realpath($binPath);
$realInstallPath = realpath($installPath);
// Fail closed if either path cannot be resolved
if (false === $realBinPath || false === $realInstallPath) {
return false;
}
return strpos($realBinPath, $realInstallPath.DIRECTORY_SEPARATOR) === 0;
}This helper is integrated directly into the downloader and installer loops. In FileDownloader.php, the permission modification is protected as follows:
foreach ($package->getBinaries() as $bin) {
$binPath = $path . '/' . $bin;
if (!file_exists($binPath) || is_executable($binPath)) {
continue;
}
// Validate containment to block directory traversal and symlink manipulation
if (!BinaryInstaller::isBinPathInsidePackage($path, $binPath)) {
continue;
}
Silencer::call('chmod', $binPath, 0777 & ~umask());
}This validation logic ensures that the physical path on the filesystem matches the installation folder context. Any malicious traversal or escaping symlink triggers an validation failure and is safely skipped.
Exploitation of CVE-2026-59944 requires an attacker to inject a malicious package into a target project or compromise an existing dependency. In a standard supply-chain attack scenario, the attacker publishes a package defining a clean path string in composer.json. For instance, 'bin/exploit' is registered. This configuration easily satisfies initial static checks.
The attacker packages bin/exploit as a physical symbolic link pointing to a target system configuration file or shell script. When a developer or CI/CD runner executes composer install, the package archive is downloaded and extracted. The extraction engine recreates the symbolic link on the local filesystem.
During the finalization phase, Composer attempts to make the defined binary executable. It calls chmod on bin/exploit. Because chmod automatically follows symbolic links, the operation changes the target file's permissions. This allows the attacker to alter the permissions of sensitive files, potentially making them world-readable, world-writable, or executable. Additionally, Composer generates an execution proxy script in vendor/bin pointing directly to the target.
The physical impact of this vulnerability depends on the environment and privileges of the executing process. When Composer runs within high-privilege automated environments, such as a CI/CD builder or deployment pipeline, the impact can be severe. The system's binary proxying mechanisms can be manipulated to redirect internal tool chains to unauthorized system files.
The CVSS v3.1 score of 6.1 reflects the necessity of user interaction. An attacker cannot trigger this vulnerability remotely without a user running a Composer command. However, in continuous integration systems where composer install is triggered automatically upon commits or pull requests, this interaction is guaranteed.
By leveraging the file-following nature of the vulnerability, an attacker can modify system file metadata or application configurations. They can alter permissions of restricted resources to extract credentials or execute persistent code. The vulnerability does not directly perform remote code execution, but it serves as a powerful primitive for privilege escalation.
The primary remediation for CVE-2026-59944 is upgrading Composer. System administrators and developers must update their installations immediately. Versions 2.2.30 and 2.10.3 contain the physical path containment check.
If an immediate upgrade is not possible, organizations should implement strict scanning rules on their deployment pipelines. The local environment must not run Composer operations under administrative or root privileges. Running Composer as an unprivileged user limits the impact of arbitrary chmod calls on system files.
Additionally, security teams should implement automated configuration checks. Ensure that the vendor folder is not restored from untrusted cache servers. Developers can audit their codebases for symbolic links by running searching commands to discover links that point outside the project boundaries.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N| Attribute | Detail |
|---|---|
| CWE ID | CWE-22, CWE-59 |
| Attack Vector | Local |
| CVSS v3.1 Score | 6.1 (Medium) |
| EPSS Score / Percentile | 0.00322 / 22.99% |
| Impact | Filesystem Permission Modification, Execution Proxying |
| Exploit Status | Proof of Concept |
| CISA KEV Status | Not Listed |
The software 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 software 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.
CVE-2026-129236 is a command-line argument injection vulnerability (CWE-88) in Kubeshark, an eBPF-based network observability tool for Kubernetes. Located within the Model Context Protocol (MCP) server implementation in cmd/mcpRunner.go, the flaw occurs when handling the start_kubeshark tool request. When the MCP server runs with the --allow-destructive flag, the callStartKubeshark function appends the caller-supplied pod_regex parameter directly to the kubeshark tap argument slice without an end-of-options (--) delimiter. Because Kubeshark uses the Cobra and pflag libraries for command-line parsing, any pod_regex value prefixed with a hyphen is interpreted as a CLI flag rather than a positional regular expression. An attacker capable of influencing MCP tool arguments, such as through indirect prompt injection against a connected Large Language Model (LLM) agent, can inject the --set flag to override Helm chart values like tap.docker.registry. Because Kubeshark deploys its worker DaemonSet with privileged security contexts and host networking enabled, redirecting the container image registry allows arbitrary code execution as root across all Kubernetes cluster nodes.
Kubeshark versions 53.1.0 prior to 53.4.0 contain an arbitrary file write and path traversal vulnerability (CWE-22) alongside an argument injection vulnerability (CWE-88) in the Model Context Protocol (MCP) server implementation (cmd/mcpRunner.go). The download_file tool fails to validate caller-supplied path and dest arguments, allowing an attacker who influences an AI agent driving kubeshark mcp to write Kubeshark Hub API responses to arbitrary locations writable by the local user. Additionally, the start_kubeshark tool appends the pod_regex argument without flag delimiters, allowing argument injection into the kubeshark tap subcommand.
CVE-2026-129300 (GHSA-xhrq-2mqv-q8wx) is an unhandled exception vulnerability in SpamScope mail-parser, a Python library used to parse raw emails. When processing an email with a malformed Received header containing an out-of-range year or timezone offset, standard library datetime conversion routines raise OverflowError or OSError. Because the internal error handler only caught TypeError and ValueError, these exceptions escape the parser hierarchy, terminating email ingestion pipelines and causing a denial of service.
CVE-2026-129301 (GHSA-8cgq-x343-p74c) is an uncaught exception and MIME interpretation conflict vulnerability in the Python email parsing library mail-parser (versions >= 4.6.0 and < 4.6.3). The write_attachments() function iterates over parsed email attachments without per-attachment exception containment. When processing a specially crafted MIME part containing an RFC 2231-encoded null byte in the filename, a basename exceeding filesystem NAME_MAX limits, or a malformed base64 payload, the function raises an unhandled standard library exception (ValueError, OSError, or binascii.Error). This prematurely aborts the attachment extraction loop, preventing subsequent attachments from being written to disk for downstream security inspection while also triggering unhandled worker crashes in applications that only catch MailParserError.
Directus versions prior to 12.3.1 contain an authorization bypass and privilege management flaw in the SharesService component. Authenticated non-administrative users with update permissions on the directus_shares collection can modify the user_created, role, item, and collection fields of an existing owned share. Because the update operation validates permissions solely against the pre-update record state without revalidating the modified fields, an attacker can reassign share ownership and role context to an administrator. Subsequent guest access using the share token derives administrative accountability, exposing restricted relational data.
CVE-2026-88987 (GHSA-qqrg-8jpm-8mph) is a stored Cross-Site Scripting (XSS) vulnerability in the Silverstripe Framework prior to version 6.2.13. The framework's HTML sanitization engine, XssSanitiser, relies on an incomplete regular expression denylist when filtering URI schemes in HTML attributes. Specifically, the sanitizer strips data:text/html URIs but fails to restrict executable XML and XHTML media types such as data:application/xhtml+xml, data:text/xml, and data:application/xml. An authenticated user with content creation privileges can embed crafted data URIs inside HTML attributes like iframe src or object data, leading to arbitrary JavaScript execution when the content is rendered by a victim's browser.