CVE-2026-42857 Open edX Platform: Stored CSS Injection in Email Notifications via Incomplete HTML Sanitization

Medium 4.6 Published Updated

Attackers can inject CSS into email notifications to track users and spoof content, requiring a patch to the HTML sanitizer.

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-2026-42857?

CVE-2026-42857 is a medium-severity cross-site scripting vulnerability in openedx-platform, published on 11 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

Open edX Platform enables the authoring and delivery of online learning at any scale. The HTML sanitizer clean_thread_html_body() used for discussion notification emails fails to remove <style> tags from user-generated discussion post content. This content is rendered with Django's |safe template filter in email notification templates, allowing any enrolled student to inject arbitrary CSS into email notifications sent to other users. This enables email tracking (IP address disclosure), content spoofing, and phishing attacks. This vulnerability is fixed with commit cddc25cd791bb78f76833896e4778f668861df12.

Weakness: CWE-79

Which versions are affected by CVE-2026-42857?

It affects 1 product.

Products include Openedx Openedx.

How do I fix CVE-2026-42857?

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

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

Sources

Also known as GHSA-4xv3-5j4x-q8g4.

Is CVE-2026-42857 in your software?

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

Check your SBOMs for free