CVE-2026-48788 Remark42: Cross-Site Scripting (XSS) on /api/v1/img via content-type spoofing

High 8.2 Published Updated

Attackers can execute arbitrary JavaScript in victims' browsers via content-type spoofing in the image proxy, potentially leading to account takeover.

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
Available

What is CVE-2026-48788?

CVE-2026-48788 is a high-severity cross-site scripting vulnerability in umputun remark42, published on 16 Jun 2026. 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

Remark42 is a self-hosted comment engine for blogs, articles, or any other place where readers can add comments. Versions 1.6.0 through 1.15.0 contain a Cross-Site Scripting (XSS) vulnerability exploitable through content-type spoofing. The Remark42 image proxy fetches an arbitrary remote URL and re-serves the response from Remark42's own origin. During the download phase, the proxy determines whether the resource is an image by inspecting only the Content-Type header advertised by the remote server, never examining the actual bytes; during the serving phase, it instead derives the response Content-Type by sniffing those bytes with http.DetectContentType. An attacker can exploit this inconsistency by hosting a URL that advertises Content-Type: image/png while returning an HTML/JavaScript body: the download check accepts it as an image, the serving path sniffs the body and emits Content-Type: text/html, and the browser renders the attacker-controlled HTML/JavaScript as a document within Remark42's origin. Exploitation requires no Remark42 account on the target instance; the attacker only needs to host the malicious upstream URL and deliver the proxy link to a victim by any means, such as email, direct message, or a link on another website. This issue has been fixed in version 1.16.0.

Weakness: CWE-79, CWE-436

Which versions are affected by CVE-2026-48788?

3 open source packages ship an affected version, including github.com/umputun/remark42.

PackageAffectedFixed in
github.com/umputun/remark42 GoFrom 1.6.01.16.0
github.com/umputun/remark42 GoFrom 1.6.01.16.0
github.com/umputun/remark42 GoFrom 1.6.01.16.0

How do I fix CVE-2026-48788?

Upgrade github.com/umputun/remark42 to 1.16.0 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-2026-48788 being exploited?

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

Sources

Also known as GHSA-4c8j-mgm4-qqvp, GO-2026-5804.

Is CVE-2026-48788 in your software?

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

Check your SBOMs for free