GHSA-7v28-g2pq-ggg8 Ghost vulnerable to remote code execution in locale setting change

Not scored Published

Authenticated attackers can execute arbitrary commands via locale settings in Ghost, requiring an upgrade to patch.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-7v28-g2pq-ggg8?

GHSA-7v28-g2pq-ggg8 is a command injection vulnerability in ghost, published on 17 Jun 2022. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

Impact

A vulnerability in an upstream library means an authenticated attacker can abuse locale input to execute arbitrary commands from a file that has previously been uploaded using the file upload functionality in the post editor.

Patches

Fixed in 5.2.3, all 5.x sites should update as soon as possible. Fixed in 4.48.2, all 4.x sites should update as soon as possible.

Workarounds

Patched versions of Ghost add validation to the locale input to prevent execution of arbitrary files. Updating Ghost is the quickest complete solution.

As a workaround, if for any reason you cannot update your Ghost instance, you can block the POST /ghost/api/admin/settings/ endpoint, which will also disable updating settings for your site.

For more information

If you have any questions or comments about this advisory:

Credits

Which versions are affected by GHSA-7v28-g2pq-ggg8?

4 open source packages ship an affected version, including ghost.

PackageAffectedFixed in
ghost npmAll versions4.48.2
ghost npmAll versions4.48.2
ghost npmFrom 5.0.05.2.3
ghost npmFrom 5.0.05.2.3

How do I fix GHSA-7v28-g2pq-ggg8?

Upgrade ghost to a fixed version for your release line: 4.48.2 or 5.2.3.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is GHSA-7v28-g2pq-ggg8 being exploited?

There is no known exploitation of GHSA-7v28-g2pq-ggg8 in the wild and no public exploit code.

Sources

Is GHSA-7v28-g2pq-ggg8 in your software?

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

Check your SBOMs for free