# baserCMS: Path Traversal Bypass via realpath() in BcThemeFileService (CVE-2026-30940 Patch Bypass)

High severity, published 2026-11-20. Update baserproject/baser-core to 5.3.0 or later: composer update baserproject/baser-core.

Canonical URL: https://buzzphp.com/security/ghsa-2pj4-v76f-wjvx · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.2) |
| Published | 2026-11-20 |
| Updated | 2026-11-20 |
| CVE | [CVE-2026-62955](https://nvd.nist.gov/vuln/detail/CVE-2026-62955) |
| GHSA | [GHSA-2pj4-v76f-wjvx](https://github.com/advisories/GHSA-2pj4-v76f-wjvx) |
| Weakness | CWE-22 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| baserproject/baser-core | < 5.3.0 | 5.3.0 |

## What to do

Update baserproject/baser-core to 5.3.0 or later: composer update baserproject/baser-core.

Check which version you run with `composer show baserproject/baser-core`, and every affected package with `composer audit`.

## About this advisory

Summary

The security patch introduced in baserCMS 5.2.3 to address CVE-2026-30940 / GHSA-c5c6-37vq-pjcq is incomplete. The patch added a realpath()-based directory traversal check in BcThemeFileService::getFullpath(), but the check is entirely skipped when realpath($baseDir) returns false — which occurs whenever the target subdirectory does not physically exist on disk.

An authenticated administrator can bypass the patch by supplying a type value (e.g., js) that maps to a non-existent directory in the theme. The absence of the directory causes realpath() to return false, the validation block is skipped, and the raw path parameter containing ../ sequences is returned unvalidated.

## Links

- [GHSA-2pj4-v76f-wjvx on GitHub](https://github.com/advisories/GHSA-2pj4-v76f-wjvx)
- [CVE-2026-62955 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-62955)
- [All Composer security advisories](https://buzzphp.com/security)
