CVE-2024-38354 Cross-site Scripting in Hackmd.io Notes lead by HTML Injection

High 8.1 Published Updated

Attackers can execute arbitrary scripts in victim browsers via unsanitized HTML injection in CodiMD notebook features.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2024-38354?

CVE-2024-38354 is a high-severity cross-site scripting vulnerability in hackmdio codimd, published on 10 Jul 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

CodiMD allows realtime collaborative markdown notes on all platforms. The notebook feature of Hackmd.io permits the rendering of iframe `HTML` tags with an improperly sanitized `name` attribute. This vulnerability enables attackers to perform cross-site scripting (XSS) attacks via DOM clobbering. This vulnerability is fixed in 2.5.4.

Weakness: CWE-79

Which versions are affected by CVE-2024-38354?

It affects 1 product.

Products include Hackmd Codimd.

How do I fix CVE-2024-38354?

No fix has been published for CVE-2024-38354 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-2024-38354 being exploited?

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

Sources

Also known as GHSA-22jv-vch8-2vp9.

Is CVE-2024-38354 in your software?

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

Check your SBOMs for free