CVE-2021-47957 WordPress Plugin Cookie Law Bar 1.2.1 Stored XSS via clb_bar_msg

Medium 5.1 Published Updated

Authenticated attackers can inject malicious scripts via the Bar Message field, leading to cookie theft and data exfiltration for all site visitors.

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
None listed

What is CVE-2021-47957?

CVE-2021-47957 is a medium-severity cross-site scripting vulnerability in Cookielawinfo Cookie Law Bar, published on 16 May 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Cookie Law Bar 1.2.1 contains a stored cross-site scripting vulnerability that allows authenticated attackers to inject malicious scripts by submitting unsanitized input to the Bar Message field. Attackers can inject script payloads through the plugin settings page that execute in the browsers of all WordPress users viewing the site, enabling cookie theft and sensitive data exfiltration.

Weakness: CWE-79

Which versions are affected by CVE-2021-47957?

How do I fix CVE-2021-47957?

No fix has been published for CVE-2021-47957 yet. Limit exposure of the affected software until one is available.

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-47957 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-47957 exists.

Sources

Also known as GHSA-fwf2-qq89-w6p9.

Is CVE-2021-47957 in your software?

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

Check your SBOMs for free