CVE-2026-30940
Received Received - Intake
Path Traversal in baserCMS Theme API Allows Remote Code Execution

Publication date: 2026-03-31

Last updated on: 2026-04-01

Assigner: GitHub, Inc.

Description
baserCMS is a website development framework. Prior to version 5.2.3, a path traversal vulnerability exists in the theme file management API (/baser/api/admin/bc-theme-file/theme_files/add.json) that allows arbitrary file write. An authenticated administrator can include ../ sequences in the path parameter to create a PHP file in an arbitrary directory outside the theme directory, which may result in remote code execution (RCE). This issue has been patched in version 5.2.3.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-31
Last Modified
2026-04-01
Generated
2026-05-07
AI Q&A
2026-03-31
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
basercms basercms to 5.2.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 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.
CWE-73 The product allows user input to control or influence paths or file names that are used in filesystem operations.
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability allows an authenticated administrator to write arbitrary PHP files outside the intended theme directory, potentially leading to remote code execution (RCE). This could result in unauthorized access, data breaches, or manipulation of sensitive information hosted on the affected baserCMS instance.

Such unauthorized access and potential data compromise could negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of personal and sensitive data against unauthorized access and modification.

Therefore, if exploited, this vulnerability could lead to violations of data protection requirements, incident reporting obligations, and overall security controls mandated by these regulations.


Can you explain this vulnerability to me?

CVE-2026-30940 is a path traversal vulnerability in baserCMS versions up to 5.2.2 affecting the theme file management API endpoint. An authenticated administrator can exploit this by including '../' sequences in the path parameter, allowing them to write arbitrary files outside the intended theme directory.

This improper validation and sanitization of the path parameter enables an attacker to create PHP files in arbitrary directories, such as the webroot, which can then be accessed to execute malicious code remotely (remote code execution).

The vulnerability requires administrator privileges and the API to be enabled. It was patched in version 5.2.3 by implementing strict path normalization and boundary checks.


How can this vulnerability impact me? :

This vulnerability can have severe impacts because it allows an attacker with administrator access to write arbitrary PHP files to any directory on the server, including the webroot.

By placing malicious PHP files, the attacker can achieve remote code execution (RCE), enabling them to run arbitrary commands on the server, potentially leading to full system compromise.

This can result in data theft, service disruption, unauthorized access, and further exploitation of the affected system.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking for unauthorized or suspicious file writes outside the theme directory via the theme file management API endpoint `/baser/api/admin/bc-theme-file/theme_files/add.json`.

Detection involves verifying if any PHP files have been created in directories outside the intended theme directory, especially in locations like the webroot directory.

You can also monitor API usage logs for POST requests to the vulnerable endpoint that include `../` sequences in the `path` parameter.

  • Use a command to search for recently created or modified PHP files outside the theme directory, for example:
  • find /path/to/baserCMS -type f -name '*.php' -not -path '*/themes/*' -mtime -7
  • Check web server access logs for suspicious requests to newly created PHP files, e.g.:
  • grep 'shell.php' /var/log/apache2/access.log
  • Inspect API logs or use network monitoring tools to detect POST requests with path traversal patterns like `../` in the `path` parameter.

What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation step is to upgrade baserCMS to version 5.2.3 or later, where this vulnerability has been patched.

If upgrading immediately is not possible, disable the core admin API by setting `USE_CORE_ADMIN_API=false` to prevent exploitation via the vulnerable API endpoint.

Restrict administrator access and ensure strong authentication to prevent unauthorized access to administrator accounts.

Monitor and audit API usage and file system changes to detect any suspicious activity.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart