Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privileged BookStack account
-
DeliveryCraft ZIP archive with .php webshell referenced as book cover
-
ExploitSubmit ZIP via portable content import UI
-
ExecutionImport runner stores .php file in public image web root
-
PersistSend unauthenticated HTTP GET to stored webshell URL
-
ImpactExecute arbitrary code as web server process user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK
2 techniques across 2 tactics: Command and Control, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated BookStack account explicitly granted both the 'Import Content' permission and the 'Create Books' permission - these are non-default assignments that an administrator must deliberately configure for a role. The attack surface is the ZIP-based portable content import feature, which must be reachable by the attacker's account. No special server configuration, non-standard deployment mode, or additional network service is required beyond a standard BookStack installation running on a PHP-capable web server with a publicly accessible upload directory. Once the malicious ZIP is successfully imported, the resulting webshell is reachable and executable by any unauthenticated HTTP client with network access to the server, removing the authentication barrier for the execution step of the attack. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) accurately captures the core risk profile: the attack path is low-complexity, requires no special server configuration, and yields full server-side code execution. The primary limiting factor is the PR:L requirement - the attacker must hold both 'Import Content' and 'Create Books' role permissions, which must be explicitly granted by an administrator and are not assigned to the default guest or viewer roles. No CISA KEV listing is present and no EPSS score was provided, so exploitation probability cannot be quantified from this data; however, the attack mechanism is mechanical (craft a ZIP, submit it, fetch the URL) and does not require heap manipulation, timing, or cryptographic bypass, making it highly reliable once the permission prerequisite is satisfied. Any deployment where non-administrator users hold content import rights should treat this as urgent regardless of instance size. No conflicting signals exist between the CVSS vector and the description; the network vector and low-privilege requirement are fully consistent with the import UI attack surface. |
| Exploit ScenarioDerived | An attacker with a low-privileged BookStack account granted both Import Content and Create Books permissions crafts a ZIP archive whose manifest references a PHP webshell file with a .php extension as the book cover. Submitting this ZIP through the BookStack import interface causes the server to extract and store the PHP file in the public image upload directory. The attacker then issues an unauthenticated HTTP GET request to the resulting cover URL, triggering PHP execution and achieving arbitrary remote code execution under the web server process identity. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 29, 2026
Remote code execution in BookStack before 26.05.4 stems from a missing MIME-type enforcement gate in the portable ZIP import pipeline, allowing authenticated users with Import Content and Create Books permissions to store a PHP webshell directly in the public web root. The import runner extracts the attacker-supplied .php file from the ZIP archive and places it in the publicly accessible image storage path without validating the file type against a supported image MIME allowlist, because the cover field used the generic fileReferenceRule() rather than imageFileReferenceRule(). Once stored, any unauthenticated HTTP client can request the cover URL to trigger PHP execution on the server. No public exploit code has been identified at time of analysis, but VulnCheck has reported this issue and a patch commit is confirmed available.
RemediationAI
Upgrade BookStack to version 26.05.4 or later, which incorporates the fix at commit e210cc32e4cbb1efeae5c5c9d0fef8e3c6a752e6 (https://github.com/BookStackApp/BookStack/commit/e210cc32e4cbb1efeae5c5c9d0fef8e3c6a752e6). The patch resolves the root cause by enforcing image MIME-type validation on ZIP-imported cover files and rewriting file extensions from sniffed MIME content, preventing .php filenames from surviving the import pipeline. If immediate upgrade is not feasible, the most effective compensating control is to revoke the 'Import Content' permission from all non-administrator roles, eliminating access to the vulnerable import feature entirely - the trade-off is loss of portable content import capability for those users. As a secondary defense-in-depth measure, configure the web server (Apache or nginx) to deny PHP execution within the BookStack image storage directory (typically public/uploads/images/), which breaks the execution step without disabling the import UI; this requires knowledge of the exact storage path configured for the specific instance and must be tested to avoid disrupting image serving.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
BookStack (cpe:2.3:a:bookstackapp:bookstack:*:*:*:*:*:*:*:*) is a PHP/Laravel-based self-hosted wiki platform that implements a portable ZIP content import feature for migrating books between instances. The import pipeline parses a structured manifest inside the ZIP and can reference a book cover image file. Prior to version 26.05.4, the cover field in ZipExportBook::validate() was checked using the generic fileReferenceRule() validator, which does not enforce image MIME types. ZipExportImage::validate() had a similar gap. CWE-434 (Unrestricted Upload of File with Dangerous Type) applies directly: by naming a PHP webshell with a .php extension inside the ZIP and referencing it as the cover, the import runner extracted and stored the file through the standard image-storage path - a directory served by the web server with PHP execution enabled. The fix introduces imageFileReferenceRule() backed by ImageService::getSupportedMimeTypes() (PNG, JPEG, GIF, WebP) and adds a forceExtensionFromMime parameter to zipFileToUploadedFile(), which sniffs the true MIME type via reader->sniffFileMime() and overwrites the filename extension before constructing the UploadedFile object, preventing .php from surviving the pipeline.
Know when Bookstack gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network-exploitable with low privileges; scope changes because the stored PHP file executes under the web server context, extending impact beyond the BookStack application boundary.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
BookStack before 26.05.4 contains a remote code execution vulnerability in the portable ZIP import functionality that allows users with Import Content and Create Books permissions to upload a PHP polyglot file as a book cover. Attackers can bypass image extension validation by embedding a PHP file with a .php filename in the ZIP archive, which is stored in the public web root and executed by unauthenticated requests.
Executive ViewAI
BookStack before version 26.05.4 contains a remote code execution vulnerability in the file import pipeline that allows authenticated users with import and book creation permissions to upload PHP webshells to the public web directory. Compromised or malicious insiders with these permissions can execute arbitrary code and fully control the affected server. Organizations using BookStack should immediately upgrade to patch this critical application-level flaw.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
bookstack is vulnerable to Improper Access Control. Rated critical severity (CVSS 9.8), this vulnerability is remotely e
In BookStack before version 0.30.4, a user with permissions to edit a page could add an attached link which would execut
bookstack is vulnerable to Cross-Site Request Forgery (CSRF). Rated medium severity (CVSS 6.8), this vulnerability is re
Book Stack version 23.10.2 allows filtering local files on the server. Rated medium severity (CVSS 6.5), this vulnerabil
bookstack is vulnerable to Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Rated medium
bookstack is vulnerable to Unrestricted Upload of File with Dangerous Type. Rated medium severity (CVSS 6.5), this vulne
bookstack is vulnerable to Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Rated medium
bookstack is vulnerable to Server-Side Request Forgery (SSRF). Rated medium severity (CVSS 6.5), this vulnerability is r
bookstack is vulnerable to Unrestricted Upload of File with Dangerous Type. Rated medium severity (CVSS 5.7), this vulne
BookStack chapter export functionality allows unauthenticated remote attackers to bypass access controls via manipulatio
Cross-site Scripting (XSS) - Stored in GitHub repository bookstackapp/bookstack prior to v22.02.3. Rated medium severity
bookstack is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Rated m
EUVD-2026-68105
GHSA-jgmr-x24h-q8jj
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB