CVE-2020-5256
PHP vulnerability analysis and mitigation

Overview

BookStack before version 0.25.5 contained a vulnerability (CVE-2020-5256) where users could upload PHP files through image upload functions, potentially allowing remote code execution. The vulnerability was discovered in early 2020 and was patched through a series of updates (v0.25.3, v0.25.4, and v0.25.5) released in March 2020 (GitHub Advisory, NVD).

Technical details

The vulnerability allowed users to upload PHP files with various extensions (including non-.php extensions like .phtml or .php3) through the image upload functionality. These files could then be executed remotely on the server with the permissions of the PHP process. The issue was particularly concerning in environments where untrusted users had permissions to upload images (GitHub v0.25.3, GitHub v0.25.4).

Impact

Successful exploitation of this vulnerability could allow attackers to execute arbitrary code on the host system with PHP process privileges. This could potentially lead to access to sensitive files on the server, including the BookStack .env file, which might contain critical configuration data and credentials (GitHub v0.25.3).

Mitigation and workarounds

The issue was addressed through multiple security patches. Version 0.25.3 added initial protections, v0.25.4 implemented a whitelist for file extensions, and v0.25.5 added prevention of multiple-extension files and implemented random file naming for attachments. Alternative workarounds included using the local_secure image storage option, utilizing S3 or similar services, or preventing direct execution of PHP files through web-server configuration (GitHub v0.25.5, GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23492HIGH8.8
  • PHPPHP
  • pimcore/pimcore
NoYesJan 14, 2026
CVE-2026-23498HIGH7.2
  • PHPPHP
  • shopware/core
NoYesJan 14, 2026
GHSA-595p-g7xc-c333MEDIUM6.9
  • PHPPHP
  • algolia/algoliasearch-magento-2
NoYesJan 14, 2026
CVE-2022-50807MEDIUM6.9
  • PHPPHP
  • concrete5/concrete5
NoNoJan 13, 2026
CVE-2026-0859MEDIUM5.2
  • PHPPHP
  • typo3/cms-core
NoYesJan 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management