CVE-2020-5256: Remote Code Execution Through Image Uploads in BookStack

Published Mar 9, 2020
·
Updated

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 localsecure 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.

Other sources

BookStack before version 0.25.5 has a vulnerability where 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. The issue was addressed in a series of patches in versions 0.25.3, 0.25.4 and 0.25.5. Users should upgrade to at least v0.25.5 to avoid this vulnerability.

— MITRE

Remote Code Execution Through Image Uploads in BookStack

— Packagist

Affected Software

3 affected componentsFixes available
bookstackapp bookstack<0.25.3
composer/ssddanbrown/bookstack<0.25.3
0.25.3
composer/ssddanbrown/bookstack<0.25.3
0.25.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/ssddanbrown/bookstack to a version that resolves this vulnerability.

    Fixed in 0.25.3
  2. Upgrade

    Upgrade composer/ssddanbrown/bookstack to a version that resolves this vulnerability.

    Fixed in 0.25.5
  3. Upgrade

    Upgrade BookStack to a version that resolves this vulnerability.

    Fixed in 0.25.5
  4. Configuration

    Use the local_secure image storage option, or an S3-compatible storage service, depending on the BookStack version.

    BookStack image storage image storage option = local_secure
  5. Compensating control

    Configure the web server to prevent direct execution of PHP files except public/index.php.

Event History

Mar 9, 2020
CVE Published
via MITRE·03:50 PM
Data Sourced
via MITRE·03:50 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeaknessAffected Software
Mar 13, 2020
Advisory Published
via GitHub·08:21 PM
Data Sourced
via GitHub·08:21 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Packagist·08:21 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is CVE-2020-5256?

CVE-2020-5256 is a vulnerability in BookStack before version 0.25.5 that allows users to upload PHP files through image upload functions, enabling them to execute remote code on the host system.

2

What is the severity of CVE-2020-5256?

CVE-2020-5256 has a severity rating of critical with a CVSS score of 8.8.

3

How does CVE-2020-5256 impact non-trusted users?

CVE-2020-5256 most impacts scenarios where non-trusted users are present, as they have the potential to execute malicious code on the host system.

4

What is the affected software version for CVE-2020-5256?

BookStack versions up to and excluding 0.25.3 are affected by CVE-2020-5256.

5

How can I mitigate CVE-2020-5256?

To mitigate CVE-2020-5256, it is recommended to update BookStack to version 0.25.5 or above.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203