GitHub Advisoryadvisory · Packagist
GHSA-g9rq-x4fj-f5hx Remote Code Execution Through Image Uploads in BookStack
HIGH
Official page ↗
- Aliases
- CVE-2020-5256
- Ecosystem
- Packagist
- Packages
- ssddanbrown/bookstack
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L
- Weaknesses
- CWE-95
- Reviewed
- 2020-03-13
Affected packages
• Packagist ssddanbrown/bookstack: < 0.25.5 → fixed in 0.25.5
Description
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 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
BookStack Beta v0.25.4
BookStack Beta v0.25.5
For more information
If you have any questions or comments about this advisory:
• Open an issue in the BookStack GitHub repository.
• Ask on the BookStack Discord chat.
• Follow the BookStack Security advise to contact someone privately.
Related
Alias · CVE (1)
- CVE-2020-5256 BookStack before version 0.25.5 has a vulnerability where a user could upload PHP files through image upload functions, which would allow… vulnerability
Weakness · CWE (1)
- CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code weakness
References
- https://github.com/BookStackApp/BookStack/security/advisories/GHSA-g9rq-x4fj-f5hx web
- https://nvd.nist.gov/vuln/detail/CVE-2020-5256 advisory
- https://github.com/BookStackApp/BookStack/releases/tag/v0.25.3 web
- https://github.com/BookStackApp/BookStack/releases/tag/v0.25.4 web
- https://github.com/BookStackApp/BookStack/releases/tag/v0.25.5 web