Loading HuntDB...

GHSA-g9rq-x4fj-f5hx

GitHub Security Advisory

Remote Code Execution Through Image Uploads in BookStack

✓ GitHub Reviewed HIGH Has CVE

Advisory Details

### Impact

A user could upload PHP files through image upload functions, which would allow them to execute code on the host system remotely. They would then have the permissions of the PHP process.

This most impacts scenarios where non-trusted users are given permission to upload images in any area of the application.

### Patches

The issue was addressed in a series of patches: v0.25.3, v0.25.4 and v0.25.5.
Users should upgrade to at least v0.25.5 to avoid this patch but ideally the latest BookStack version as previous versions are un-supported.

### Workarounds

Depending on BookStack version, you could use the [local_secure](https://www.bookstackapp.com/docs/admin/upload-config/#local-secure) image storage option, or use s3 or a similar compatible service.

Preventing direct execution of any `php` files, apart from the `public/index.php` file, though web-server configuration would also prevent this.

### References

[BookStack Beta v0.25.3](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.3)
[BookStack Beta v0.25.4](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.4)
[BookStack Beta v0.25.5](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.5)

### For more information

If you have any questions or comments about this advisory:
* Open an issue in [the BookStack GitHub repository](BookStackApp/BookStack/issues).
* Ask on the [BookStack Discord chat](https://discord.gg/ztkBqR2).
* Follow the [BookStack Security advise](https://github.com/BookStackApp/BookStack#-security) to contact someone privately.

Affected Packages

Packagist ssddanbrown/bookstack
Affected versions: 0 (fixed in 0.25.5)

Related CVEs

Key Information

GHSA ID
GHSA-g9rq-x4fj-f5hx
Published
March 13, 2020 8:21 PM
Last Modified
January 8, 2021 9:18 PM
CVSS Score
7.5 /10
Primary Ecosystem
Packagist
Primary Package
ssddanbrown/bookstack
GitHub Reviewed
✓ Yes

Dataset

Last updated: July 10, 2025 6:27 AM

Data from GitHub Advisory Database. This information is provided for research and educational purposes.