CVE-2026-40487 Postiz Has Unrestricted File Upload via MIME Type Spoofing that Leads to Stored XSS

High 8.9 Published Updated

Authenticated users can upload malicious files via MIME spoofing, leading to stored XSS and potential account takeover in Postiz.

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-40487?

CVE-2026-40487 is a high-severity vulnerability in gitroomhq postiz-app, published on 18 Apr 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

Postiz is an AI social media scheduling tool. Prior to version 2.21.6, a file upload validation bypass allows any authenticated user to upload arbitrary HTML, SVG, or other executable file types to the server by spoofing the `Content-Type` header. The uploaded files are then served by nginx with a Content-Type derived from their original extension (`text/html`, `image/svg+xml`), enabling Stored Cross-Site Scripting (XSS) in the context of the application's origin. This can lead to session riding, account takeover, and full compromise of other users' accounts. Version 2.21.6 contains a fix.

Weakness: CWE-79, CWE-434, CWE-345

Which versions are affected by CVE-2026-40487?

It affects 1 product.

Products include Gitroom Postiz.

How do I fix CVE-2026-40487?

No fix has been published for CVE-2026-40487 yet. Limit exposure of the affected software until one is available.

Is CVE-2026-40487 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-44wg-r34q-hvfx.

Is CVE-2026-40487 in your software?

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

Check your SBOMs for free