Cythera Cyber Security

Statamic CMS

A local file inclusion vulnerability was identified in Statamic CMS’s upload process. This issue, particularly affecting front-end forms with asset fields, could be exploited to write files to unintended locations.
Talk to an expert

Introduction

Cythera uncovered a vulnerability in Statamic CMS, a PHP-based open-source content management system. The flaw stemmed from improper filename sanitisation, allowing unauthenticated users to upload files outside the designated directory. This could result in file overwrites and compromise site integrity, posing a significant risk to impacted environments.

Vulnerability

Statamic CMS (prior to v5.17.0) contained a file upload vulnerability due to insufficient filename sanitisation. Specifically affecting the assets field in front-end forms, this issue allowed attackers to craft malicious filenames that bypassed directory constraints. Exploiting this flaw, a threat actor could upload files outside the intended directories, potentially overwriting critical application files or placing unauthorised scripts in protected areas of the filesystem or container environment.

Summary

This medium-risk vulnerability allows attackers to fully compromise the container's integrity but does not grant access to file paths beyond the container itself. If the upload functionality is exposed, an attacker could exploit it to modify configuration files or upload malicious scripts, depending on the permitted file types. The risk increases when upload paths are shared across critical system components.

At the core of this issue is insufficient input validation and sanitisation during file uploads. Statamic CMS does not properly restrict characters commonly used in path traversal attacks. As a result, attackers can use sequences like ../ to bypass directory restrictions. The vulnerability is further worsened by the system’s reliance on the user-supplied filename to determine the file storage location.

To exploit this flaw, an attacker needs access to a form or upload endpoint that accepts file submissions. Once access is gained, they can craft a malicious filename to navigate directories and place files in unintended locations. This risk is significant because the upload feature is intended for public use, even by unauthenticated users.

Proof of Concept

A demonstration is available here:
👉 https://youtu.be/pK-KloyCIzw

How to Fix

Upgrade to Statamic CMS version 5.17.0 or later, where the issue has been addressed.

Vulnerability Disclosure Timeline

  • 18/11/2024 – Issue disclosed
  • 19/11/2024 – Vendor acknowledged
  • 19/11/2024 – CVE assigned (CVE-2024-52600)
  • 25/11/2024 – Cythera publishes advisory


CIO
Government Agency
Cythera operates as an extension of our team. When we call there is an immediate response and the person that answers our call is the person that resolves our issue. Cythera understands our network, and more importantly, has taken the time to understand our business. We find it easy to work with Cythera. They are approachable, flexible and have taken the time to build deep relationships with our team. It is a partnership and friendship. Cythera’s personalised, highly specialised services makes all the difference. We would recommend Cythera to anyone in the industry looking for a managed services partner.
Expert methods

We have the tools to pinpoint risks

Whether it’s hidden vulnerabilities or patterns you might miss, we help you stay one step ahead and make confident, informed decisions. Understand how our services can help your business uncover critical risks

Talk to an expert
Employee Cyber Training & Awareness
Your people are your first line of defence. Our cyber training builds awareness sharpens instincts and turns everyday staff into assets.
Advisory
When clarity is critical and stakes are high, our advisory services deliver strategic, executive-level security expertise that empowers decision-making and resilient operations.