CVE-2020-11055: Ssddanbrown/bookstack Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-5vf7-q87h-pg6w
CVSS 6.3
CWE-79
Published
Advisory Summary

CVE-2020-11055 is a MODERATE (CVSS 6.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Ssddanbrown/bookstack libraries in the Packagist ecosystem. The issue involves cross-site scripting in bookstack. Remediation is available by upgrading affected packages to version 0.29.2.

CVE-2020-11055 at a Glance

CVE Identifier CVE-2020-11055
GHSA Identifier GHSA-5vf7-q87h-pg6w
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Ssddanbrown/bookstack
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2020-11055

To remediate this vulnerability, upgrade all affected Ssddanbrown/bookstack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ssddanbrown/bookstack fixed: 0.29.2
Upgrade ssddanbrown/bookstack to 0.29.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ssddanbrown/bookstack

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-11055, inspect your project dependencies for Ssddanbrown/bookstack:

inspect dependencies for ssddanbrown/bookstack

Analyze the terminal output to locate any version of Ssddanbrown/bookstack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.29.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Ssddanbrown/bookstack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 * [BookStack Beta v0.29.2](https://github.com/BookStackApp/BookStack/releases/tag/v0.29.2) * JVN#41035278 * [BookStack Blog Post](https://bookstackapp.com/blog/beta-release-v0-29-2/) ### For more information If you have any questions or comments about this advisory: * Open an issue in [the BookStack GitHub repository](BookStackApp/BookStack/issues). * Ask on the [BookStack Discord chat](https://discord.gg/ztkBqR2). * Follow the [BookStack Security Advice](https://github.com/BookStackApp/BookStack#-security) to contact someone privately.

CVE-2020-11055 Affected Ssddanbrown/bookstack Versions

1 component(s)
Fixed Versions:
0.29.2
Product / Package Ecosystem Affected Versions Fixed Version
ssddanbrown/bookstack
Packagist
≥ 0.18.0
< 0.29.2
0.29.2

References

Frequently Asked Questions

What is CVE-2020-11055?
CVE-2020-11055 is a security vulnerability in Ssddanbrown/bookstack involving Cross-Site Scripting in BookStack under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Ssddanbrown/bookstack versions are affected?
Affected versions include releases prior to 0.29.2 across affected packages: ssddanbrown/bookstack.
What version fixes CVE-2020-11055?
Upgrading to 0.29.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ssddanbrown/bookstack affected?
Yes, ssddanbrown/bookstack is affected in releases prior to 0.29.2. Upgrade your dependency to 0.29.2 or later.
What is the CVSS score of CVE-2020-11055?
CVE-2020-11055 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2020-11055?
CVE-2020-11055 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2020-11055?
Run the dependency tree command: 'inspect dependencies for ssddanbrown/bookstack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5vf7-q87h-pg6w",
  "modified" : "2021-01-08T20:20:35Z",
  "published" : "2020-05-07T21:10:26Z",
  "aliases" : [ "CVE-2020-11055" ],
  "summary" : "Cross-Site Scripting in BookStack",
  "details" : "### Impact\n\nA 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.\n\nThis most impacts scenarios where not-trusted users are given permission to create comments.\n\n### Patches\n\nThe issue was addressed in BookStack v0.29.2.\n\nAfter upgrading, The command `php artisan bookstack:regenerate-comment-content` should be ran to remove any pre-existing dangerous content. \n\n### Workarounds\n\nComments 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. \n\n### References\n\n* [BookStack Beta v0.29.2](https://github.com/BookStackApp/BookStack/releases/tag/v0.29.2)\n* JVN#41035278\n* [BookStack Blog Post](https://bookstackapp.com/blog/beta-release-v0-29-2/)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [the BookStack GitHub repository](BookStackApp/BookStack/issues).\n* Ask on the [BookStack Discord chat](https://discord.gg/ztkBqR2).\n* Follow the [BookStack Security Advice](https://github.com/BookStackApp/BookStack#-security) to contact someone privately.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ssddanbrown/bookstack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.18.0"
      }, {
        "fixed" : "0.29.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/BookStackApp/BookStack/security/advisories/GHSA-5vf7-q87h-pg6w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-11055"
  }, {
    "type" : "WEB",
    "url" : "https://bookstackapp.com/blog/beta-release-v0-29-2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/BookStackApp/BookStack/releases/tag/v0.29.2"
  }, {
    "type" : "WEB",
    "url" : "http://jvn.jp/en/jp/JVN41035278/index.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-05-07T18:36:46Z",
    "nvd_published_at" : null
  }
}