GHSA-5vf7-q87h-pg6w

Suggest an improvement
Source
https://github.com/advisories/GHSA-5vf7-q87h-pg6w
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/05/GHSA-5vf7-q87h-pg6w/GHSA-5vf7-q87h-pg6w.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-5vf7-q87h-pg6w
Aliases
Published
2020-05-07T21:10:26Z
Modified
2024-02-16T08:09:18.117449Z
Severity
  • 6.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L CVSS Calculator
Summary
Cross-Site Scripting in BookStack
Details

Impact

A user with permission to create comments could POST HTML directly to the system to be saved in a comment, which would then be executed/displayed to others users viewing the comment. Through this vulnerability custom JavaScript code could be injected and therefore ran on other user machines.

This most impacts scenarios where not-trusted users are given permission to create comments.

Patches

The issue was addressed in BookStack v0.29.2.

After upgrading, The command php artisan bookstack:regenerate-comment-content should be ran to remove any pre-existing dangerous content.

Workarounds

Comments can be disabled in the system settings to prevent them being shown to users. Alternatively, comment creation permissions can be altered as required to only those who are trusted but this will not address existing exploitation of this vulnerability.

References

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 Advice to contact someone privately.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2020-05-07T18:36:46Z"
}
References

Affected packages

Packagist / ssddanbrown/bookstack

Package

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

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.18.0
Fixed
0.29.2

Affected versions

v0.*

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
v0.25.5
v0.26.0
v0.26.1
v0.26.2
v0.26.3
v0.26.4
v0.27
v0.27.1
v0.27.2
v0.27.3
v0.27.4
v0.27.5
v0.28.0
v0.28.1
v0.28.2
v0.28.3
v0.29.0
v0.29.1