CVE-2021-29438 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in @nextcloud/dialogs

Medium 4.6 Published Updated

An attacker can execute arbitrary scripts via insufficiently escaped user input in Nextcloud dialog toasts, affecting applications using the library.

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-2021-29438?

CVE-2021-29438 is a medium-severity cross-site scripting vulnerability in nextcloud-dialogs, published on 13 Apr 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

The Nextcloud dialogs library (npm package @nextcloud/dialogs) before 3.1.2 insufficiently escaped text input passed to a toast. If your application displays toasts with user-supplied input, this could lead to a XSS vulnerability. The vulnerability has been patched in version 3.1.2 If you need to display HTML in the toast, explicitly pass the `options.isHTML` config flag.

Weakness: CWE-80, CWE-79

Which versions are affected by CVE-2021-29438?

2 open source packages ship an affected version, including @nextcloud/dialogs. It affects 1 product.

PackageAffectedFixed in
@nextcloud/dialogs npmAll versions3.1.2
@nextcloud/dialogs npmAll versions3.1.2

Products include Nextcloud\/Dialogs Project Nextcloud\/Dialogs.

How do I fix CVE-2021-29438?

Upgrade @nextcloud/dialogs to 3.1.2 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-2021-29438 being exploited?

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

Sources

Also known as GHSA-g3fq-3v3g-mh32.

Is CVE-2021-29438 in your software?

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

Check your SBOMs for free