{
  "id": "CVE-2026-40487",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-40487",
  "published_at": "2026-04-18T01:19:06.588Z",
  "title": "Postiz Has Unrestricted File Upload via MIME Type Spoofing that Leads to Stored XSS",
  "vendor": "gitroomhq",
  "product": "postiz-app",
  "cvss": {
    "score": 9,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-04-15T12:33:58Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": -2.5,
    "repo": "Astaruf/CVE-2026-40487",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-79",
  "cpes": [
    "cpe:2.3:a:gitroom:postiz:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.9,
    "nvd": 9
  },
  "repos": [
    {
      "repo": "Astaruf/CVE-2026-40487",
      "url": "https://github.com/Astaruf/CVE-2026-40487",
      "created_at": "2026-04-15T12:33:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-09-27T21:30:33Z"
    },
    {
      "repo": "ashrafzaryouh/CVE-2026-42208",
      "url": "https://github.com/ashrafzaryouh/CVE-2026-42208",
      "created_at": "2026-05-03T10:55:34Z",
      "first_seen_at": "2026-11-15T02:31:15.731Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-02-06T16:11:55Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "gitroomhq",
        "product": "postiz-app",
        "ranges": [
          "\u003c 2.21.6"
        ],
        "fixed_in": [
          "2.21.6"
        ]
      }
    ],
    "upgrade": [
      "Upgrade postiz-app to 2.21.6 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/gitroomhq/postiz-app/security/advisories/GHSA-44wg-r34q-hvfx"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/gitroomhq/postiz-app/releases/tag/v2.21.6"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [
    {
      "method": "POST",
      "path_template": "/api/auth/login",
      "body_markers": [
        "\"provider\":\"LOCAL\"",
        "\"email\"",
        "\"password\""
      ],
      "content_type": "application/json",
      "ports": [
        5000,
        8080
      ],
      "protocol": "https",
      "repos": [
        "Astaruf/CVE-2026-40487"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "Astaruf/CVE-2026-40487/poc.py:802"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/auth/register",
      "body_markers": [
        "\"provider\":\"LOCAL\"",
        "\"email\"",
        "\"password\"",
        "\"company\""
      ],
      "content_type": "application/json",
      "ports": [
        5000,
        8080
      ],
      "protocol": "https",
      "repos": [
        "Astaruf/CVE-2026-40487"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "Astaruf/CVE-2026-40487/poc.py:786"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/media/upload-server",
      "content_type": "multipart/form-data",
      "ports": [
        5000,
        8080
      ],
      "protocol": "https",
      "repos": [
        "Astaruf/CVE-2026-40487"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "Astaruf/CVE-2026-40487/poc.py:842",
        "Astaruf/CVE-2026-40487/poc.py:1112"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/oauth/token",
      "body_markers": [
        "\"grant_type\":\"authorization_code\"",
        "\"code\"",
        "\"client_id\"",
        "\"client_secret\"",
        "\"redirect_uri\""
      ],
      "content_type": "application/json",
      "ports": [
        5000,
        8080
      ],
      "protocol": "https",
      "repos": [
        "Astaruf/CVE-2026-40487"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "Astaruf/CVE-2026-40487/poc.py:224"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/public/v1/upload",
      "headers": [
        {
          "name": "Authorization",
          "value": "{var}"
        }
      ],
      "content_type": "multipart/form-data",
      "ports": [
        5000,
        8080
      ],
      "protocol": "https",
      "repos": [
        "Astaruf/CVE-2026-40487"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "Astaruf/CVE-2026-40487/poc.py:835",
        "Astaruf/CVE-2026-40487/poc.py:1105"
      ]
    }
  ],
  "rules": []
}
