GHSA-g9rq-x4fj-f5hx

Suggest an improvement
Source
https://github.com/advisories/GHSA-g9rq-x4fj-f5hx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/03/GHSA-g9rq-x4fj-f5hx/GHSA-g9rq-x4fj-f5hx.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-g9rq-x4fj-f5hx
Aliases
Published
2020-03-13T20:21:27Z
Modified
2023-11-08T04:03:53.151541Z
Severity
  • 7.9 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L CVSS Calculator
Summary
Remote Code Execution Through Image Uploads in BookStack
Details

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.

Database specific
{
    "nvd_published_at": null,
    "github_reviewed_at": "2020-03-13T20:20:25Z",
    "severity": "HIGH",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-95"
    ]
}
References

Affected packages

Packagist / ssddanbrown/bookstack

Package

Name
ssddanbrown/bookstack
Purl
pkg:composer/ssddanbrown/bookstack

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.25.5

Affected versions

V0.*

V0.7.5

v0.*

v0.5.0
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.7.0
v0.7.3
v0.7.4
v0.7.6
v0.8.0
v0.8.1
v0.8.2
v0.9.0
v0.9.1
v0.9.2
v0.9.3
v0.10.0
v0.11.0
v0.11.1
v0.11.2
v0.12.0
v0.12.1
v0.12.2
v0.13.0
v0.13.1
v0.14.0
v0.14.1
v0.14.2
v0.14.3
v0.15.0
v0.15.1
v0.15.2
v0.15.3
v0.16.0
v0.16.1
v0.16.2
v0.16.3
v0.17.0
v0.17.1
v0.17.2
v0.17.3
v0.17.4
v0.18.0
v0.18.1
v0.18.2
v0.18.3
v0.18.4
v0.18.5
v0.19.0
v0.20.0
v0.20.1
v0.20.2
v0.20.3
v0.21.0
v0.22.0
v0.23.0
v0.23.1
v0.23.2
v0.24.0
v0.24.1
v0.24.2
v0.24.3
v0.25.0
v0.25.1
v0.25.2
v0.25.3
v0.25.4

0.*

0.7.2

Database specific

{
    "last_known_affected_version_range": "< 0.25.3"
}