GHSA-77mv-mp2j-gxxh pygmentize Remote Code Execution

Not scored Published

Attackers can execute arbitrary code by exploiting unsafe input sanitization in the pygmentize highlight function.

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

What is GHSA-77mv-mp2j-gxxh?

GHSA-77mv-mp2j-gxxh is a code injection vulnerability in 3f/pygmentize, published on 15 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

pygmentize is prone to remote code execution due to an unsafe sanitazation of user input when passed to the highlight function.

Which versions are affected by GHSA-77mv-mp2j-gxxh?

2 open source packages ship an affected version, including 3f/pygmentize.

PackageAffectedFixed in
3f/pygmentize PackagistAll versions1.2
3f/pygmentize PackagistAll versions1.2

How do I fix GHSA-77mv-mp2j-gxxh?

Upgrade 3f/pygmentize to 1.2 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is GHSA-77mv-mp2j-gxxh being exploited?

There is no known exploitation of GHSA-77mv-mp2j-gxxh in the wild and no public exploit code.

Sources

Is GHSA-77mv-mp2j-gxxh in your software?

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

Check your SBOMs for free