Gitroomhq postiz-app
Postiz Has Unrestricted File Upload via MIME Type Spoofing that Leads to Stored XSS
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.21.6
Fixed in 2.21.6
Mitigation
Upgrade postiz-app to 2.21.6 or later.
References
- Vendor advisory github.com/gitroomhq/postiz-app/security/advis…
- Release notes github.com/gitroomhq/postiz-app/releases/tag/v…
Timeline
Days relative to CVE publicationFirst public PoC 2.5 days before publication; not in CISA KEV. First PoC: Astaruf/CVE-2026-40487 (created 15 Apr 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs · 1 pending
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Astaruf/CVE-2026-40487 | 15 Apr 2026 −2.5 d | 3 | PoC |
Pending 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| ashrafzaryouh/CVE-2026-42208 | 3 May 2026 +15 d | 0 | Pending |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /api/auth/login
- Body markers
"provider":"LOCAL""email""password"inapplication/json- Ports
- 5000, 8080
- Seen in
- 1 repo: Astaruf/CVE-2026-40487
- Evidence
- Astaruf/CVE-2026-40487/poc.py:802
POST /api/auth/register
- Body markers
"provider":"LOCAL""email""password""company"inapplication/json- Ports
- 5000, 8080
- Seen in
- 1 repo: Astaruf/CVE-2026-40487
- Evidence
- Astaruf/CVE-2026-40487/poc.py:786
POST /api/media/upload-server
- Content-Type
multipart/form-data- Ports
- 5000, 8080
- Seen in
- 1 repo: Astaruf/CVE-2026-40487
- Evidence
- Astaruf/CVE-2026-40487/poc.py:842 Astaruf/CVE-2026-40487/poc.py:1112
POST /api/oauth/token
- Body markers
"grant_type":"authorization_code""code""client_id""client_secret""redirect_uri"inapplication/json- Ports
- 5000, 8080
- Seen in
- 1 repo: Astaruf/CVE-2026-40487
- Evidence
- Astaruf/CVE-2026-40487/poc.py:224
POST /api/public/v1/upload
- Key headers
Authorization: {var}- Content-Type
multipart/form-data- Ports
- 5000, 8080
- Seen in
- 1 repo: Astaruf/CVE-2026-40487
- Evidence
- Astaruf/CVE-2026-40487/poc.py:835 Astaruf/CVE-2026-40487/poc.py:1105
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/auth/login(?:[?#].*)?$
(?i)^/api/auth/register(?:[?#].*)?$
(?i)^/api/media/upload-server(?:[?#].*)?$
(?i)^/api/oauth/token(?:[?#].*)?$
(?i)^/api/public/v1/upload(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [5000,8080] (msg:"GG PoC-Monitor CVE-2026-40487 gitroomhq postiz-app exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/auth/login"; http.request_body; content:"|22|provider|22|:|22|LOCAL|22|"; http.request_body; content:"|22|email|22|"; http.request_body; content:"|22|password|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-40487; classtype:web-application-attack; sid:9496722; rev:1;)
alert http any any -> $HOME_NET [5000,8080] (msg:"GG PoC-Monitor CVE-2026-40487 gitroomhq postiz-app exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/auth/register"; http.request_body; content:"|22|provider|22|:|22|LOCAL|22|"; http.request_body; content:"|22|email|22|"; http.request_body; content:"|22|password|22|"; http.request_body; content:"|22|company|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-40487; classtype:web-application-attack; sid:9031136; rev:1;)
alert http any any -> $HOME_NET [5000,8080] (msg:"GG PoC-Monitor CVE-2026-40487 gitroomhq postiz-app exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/media/upload-server"; reference:url,poc.griffinguard.io/cve/CVE-2026-40487; classtype:web-application-attack; sid:9878850; rev:1;)
alert http any any -> $HOME_NET [5000,8080] (msg:"GG PoC-Monitor CVE-2026-40487 gitroomhq postiz-app exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/oauth/token"; http.request_body; content:"|22|grant_type|22|:|22|authorization_code|22|"; http.request_body; content:"|22|code|22|"; http.request_body; content:"|22|client_id|22|"; http.request_body; content:"|22|client_secret|22|"; http.request_body; content:"|22|redirect_uri|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-40487; classtype:web-application-attack; sid:9885311; rev:1;)
alert http any any -> $HOME_NET [5000,8080] (msg:"GG PoC-Monitor CVE-2026-40487 gitroomhq postiz-app exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/public/v1/upload"; http.header_names; content:"Authorization"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-40487; classtype:web-application-attack; sid:9843915; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: gitroomhq postiz-app exploit attempt (CVE-2026-40487)
id: gg-pocmon-cve-2026-40487-9496722
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40487. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40487
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/auth/login'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40487
title: gitroomhq postiz-app exploit attempt (CVE-2026-40487)
id: gg-pocmon-cve-2026-40487-9031136
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40487. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40487
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/auth/register'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40487
title: gitroomhq postiz-app exploit attempt (CVE-2026-40487)
id: gg-pocmon-cve-2026-40487-9878850
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40487. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40487
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/media/upload-server'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40487
title: gitroomhq postiz-app exploit attempt (CVE-2026-40487)
id: gg-pocmon-cve-2026-40487-9885311
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40487. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40487
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/oauth/token'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40487
title: gitroomhq postiz-app exploit attempt (CVE-2026-40487)
id: gg-pocmon-cve-2026-40487-9843915
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40487. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40487
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/public/v1/upload'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40487