Lucene search

K
githubGitHub Advisory DatabaseGHSA-G9RQ-X4FJ-F5HX
HistoryMar 13, 2020 - 8:21 p.m.

Remote Code Execution Through Image Uploads in BookStack

2020-03-1320:21:27
CWE-95
GitHub Advisory Database
github.com
87

9 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:S/C:C/I:C/A:C

8.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

0.002 Low

EPSS

Percentile

64.6%

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:

Affected configurations

Vulners
Node
ssddanbrownbookstackRange<0.25.3
CPENameOperatorVersion
ssddanbrown/bookstacklt0.25.3

9 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:S/C:C/I:C/A:C

8.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

0.002 Low

EPSS

Percentile

64.6%

Related for GHSA-G9RQ-X4FJ-F5HX