Zvolte jazyk

WHAT ARE YOU LOOKING FOR?

Popular Tags

Raleigh, NC

32°F
Clear Sky Humidity: 75%
Wind: 2.57 M/S

Malicious Dependencies Leverage Composer Vulnerability for Credential and Data Theft

Malicious Dependencies Leverage Composer Vulnerability for Credential and Data Theft

A recently disclosed security vulnerability in Composer, the popular PHP dependency management tool, could enable malicious or compromised packages to alter file permissions outside their intended installation directories, potentially exposing sensitive data on affected systems.

Tracked as CVE-2026-59944, the flaw impacts Composer installations that process unsafe package binary paths. On shared hosting environments and multi-tenant systems, the vulnerability could lead to the unintended exposure of confidential files, including SSH keys and other sensitive resources.

The issue has been assigned a Moderate severity rating and affects Composer versions 2.3.0 through 2.10.2 and all versions prior to 2.2.30. The Composer project has addressed the vulnerability in versions 2.10.3 and 2.2.30.

Path Traversal and Symlink Abuse at the Core

The vulnerability stems from weaknesses in Composer's handling of package binaries, specifically involving path traversal and symbolic link (symlink) resolution.

Attackers can craft a malicious package that declares a binary file as a symbolic link pointing to a location outside the package directory. During installation, Composer may follow the symlink, modify permissions on the external file, and register it as an executable command within the project's vendor/bin directory.

While the flaw does not directly provide remote code execution or immediate access to sensitive data, it can weaken file protections by making previously restricted files readable and executable by other users or processes on the system.

In shared environments, this permission change can significantly increase the risk of unauthorized access to confidential information.

Bypassing Previous Security Protections

Researchers discovered that the vulnerability effectively circumvents safeguards introduced in an earlier Composer security advisory, GHSA-gjfg-22fp-rrxx.

Previous mitigations blocked package binaries that contained explicit ".." path traversal sequences. However, those validation checks were only enforced during specific stages of dependency processing.

The newly identified flaw allows attackers to bypass those protections through symbolic links or dependency metadata inherited from previous build environments.

The risk becomes especially significant when organizations reuse existing vendor directories obtained from lower-trust or untrusted sources.

Common situations where exposure may occur include:

  • Shared CI/CD dependency caches
  • Vendor directories copied between container build stages
  • Legacy Composer installations
  • Build pipelines involving less-trusted processes or contributors

Build and Deployment Pipelines at Risk

According to the GitHub security advisory, a standard composer install operation executed in automated build or deployment environments can unknowingly trigger the dangerous permission changes.

Because Composer performs the operation using the privileges of the account executing the installation, sensitive files outside the package directory may be exposed without any obvious warning signs.

To address the issue, Composer now performs stricter validation to ensure every declared package binary resolves within the package's own directory structure.

If a binary points outside the installation path, Composer skips the file and generates a warning instead of modifying the targeted resource.

Mitigation and Recommendations

Security teams and developers should upgrade immediately to Composer 2.10.3 or Composer 2.2.30 to eliminate the vulnerability.

Additional security measures include:

  • Rebuilding vendor directories from trusted sources.
  • Avoiding the reuse of cached dependencies from untrusted environments.
  • Reviewing CI/CD pipelines for dependency integrity risks.
  • Validating container build stages and inherited artifacts.
  • Monitoring for unexpected permission changes on sensitive files.

Organizations should pay special attention to deployment environments that rely heavily on cached dependencies, shared build infrastructure, or third-party packages.

Impact Assessment

The vulnerability is associated with several Common Weakness Enumerations (CWEs), including:

  • CWE-22: Path Traversal
  • CWE-59: Improper Link Resolution Before File Access
  • CWE-732: Incorrect Permission Assignment for Critical Resources

Although exploitation requires local execution of Composer's dependency installation process and some degree of user interaction, the vulnerability presents a substantial confidentiality risk by potentially exposing protected files to unauthorized users.

The advisory's CVSS assessment highlights low attack complexity and high confidentiality impact, underscoring the importance of prompt remediation, particularly in shared development, build, and hosting environments.

Found this article interesting? Follow us on X(Twitter) ,Threads and FaceBook to read more exclusive content we post. 

Cybersecurity Insight delivers timely updates on global cybersecurity developments, including recent system breaches, cyber-attacks, advancements in artificial intelligence (AI), and emerging technology innovations. Our goal is to keep viewers well-informed about the latest trends in technology and system security, and how these changes impact our lives and the broader ecosystem

Please fill the required field.