CVE-2022-47197 Cross-site scripting in Ghost

Critical 9.0 Published Updated

Stored XSS in Ghost allows non-admins to inject JavaScript, leading to privilege escalation to administrator when an admin views the post.

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-2022-47197?

CVE-2022-47197 is a critical cross-site scripting vulnerability in Ghost, published on 19 Jan 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

An insecure default vulnerability exists in the Post Creation functionality of Ghost Foundation Ghost 5.9.4. Default installations of Ghost allow non-administrator users to inject arbitrary Javascript in posts, which allow privilege escalation to administrator via XSS. To trigger this vulnerability, an attacker can send an HTTP request to inject Javascript in a post to trick an administrator into visiting the post.A stored XSS vulnerability exists in the `codeinjection_foot` for a post.

Weakness: CWE-79, CWE-453

Which versions are affected by CVE-2022-47197?

1 open source package ship an affected version, including ghost. It affects 1 product.

PackageAffectedFixed in
ghost BitnamiFrom 5.9.45.9.5

Products include Ghost Ghost.

How do I fix CVE-2022-47197?

Upgrade ghost to 5.9.5 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-2022-47197 being exploited?

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

Sources

Also known as BIT-ghost-2022-47197, GHSA-vw7m-649j-qh5x.

Is CVE-2022-47197 in your software?

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

Check your SBOMs for free