Disclosed vulnerabilities
Fixed: Dec 11, 2023
CVE-2023-49089 Published: Oct 21, 2024

Path Traversal on Package Name in @umbraco/Umbraco-CMS

6.5 Medium Severity package Path-Traversal umbraco
Mário Teixeira Reported by Checkmarx Zero

Summary

The package @umbraco/Umbraco-CMS contains a path traversal vulnerability in the Create Package functionality. A user with high privileges can input a relative or absolute path as the package name, which results in the creation of a folder and a packages.xml file in that location. If the folder already exists, the file can be overwritten. Although this issue requires high privileges, it presents a risk of unintended file modifications. The issue was resolved by sanitizing the package name to prevent path traversal.

Product

This vulnerability affects @umbraco/Umbraco-CMS versions:

  • 8.0.0 through 8.18.9
  • 9.0.0 through 10.8.0
  • 11.0.0 through 12.3.3

Impact

The vulnerability allows an authenticated user with the ability to create packages to specify arbitrary paths, resulting in potential overwriting of files outside the intended directory.

Steps to reproduce

  1. Log in with sufficient privileges to create packages in @umbraco/Umbraco-CMS.
  2. Use the “Create Package” functionality and set the package name to a relative or absolute path, e.g., ../../some/folder.
  3. Upon creation, a packages.xml file will be created in the specified directory, and if the directory already exists, the file will be overwritten.

Expected result:

The path traversal allows creating or overwriting files outside the intended directory.

Remediation

The issue was resolved by sanitizing the input for the package name to prevent path traversal attacks. The patched versions ensure that package names cannot include relative or absolute paths.

The fix was released in the following versions:

  • 8.18.10
  • 10.8.1
  • 12.3.4

Credit

This issue was discovered and reported by Checkmarx AppSec Analyst Mário Teixeira.

Resources

  1. CVE-2023-49089
  2. GHSA-6324-52pr-h4p5
  3. Fix Commit

Stay connected and never miss a research update!