CVE-2020-26211 Cross-Site Scripting in BookStack

High 7.7 Published Updated

An attacker with page edit permissions can inject JavaScript via javascript: URIs or meta tags, leading to script execution or silent redirects.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-26211?

CVE-2020-26211 is a high-severity cross-site scripting vulnerability in BookStackApp BookStack, published on 3 Nov 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

In BookStack before version 0.30.4, a user with permissions to edit a page could insert JavaScript code through the use of `javascript:` URIs within a link or form which would run, within the context of the current page, when clicked or submitted. Additionally, a user with permissions to edit a page could insert a particular meta tag which could be used to silently redirect users to a alternative location upon visit of a page. Dangerous content may remain in the database but will be removed before being displayed on a page. If you think this could have been exploited the linked advisory provides a SQL query to test. As a workaround without upgrading, page edit permissions could be limited to only those that are trusted until you can upgrade although this will not address existing exploitation of this vulnerability. The issue is fixed in BookStack version 0.30.4.

Weakness: CWE-79

Which versions are affected by CVE-2020-26211?

2 open source packages ship an affected version, including ssddanbrown/bookstack. It affects 1 product.

PackageAffectedFixed in
ssddanbrown/bookstack PackagistAll versions0.30.4
ssddanbrown/bookstack PackagistAll versions0.30.4

Products include Bookstackapp Bookstack.

How do I fix CVE-2020-26211?

Upgrade ssddanbrown/bookstack to 0.30.4 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2020-26211 being exploited?

There is no known exploitation of CVE-2020-26211 in the wild and no public exploit code.

Sources

Also known as GHSA-ch37-ch8w-cfrq, GHSA-r2cf-8778-3jgp.

Is CVE-2020-26211 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free