ADVISORIES

GitHub Advisory Database

GHSA-9329-mxxw-qwf8

Strapi core vulnerable to sensitive data exposure via CORS misconfiguration

Details

Summary

A CORS misconfiguration vulnerability exists in default installations of Strapi where attacker-controlled origins are improperly reflected in API responses.

Technical Details

By default, Strapi reflects the value of the Origin header back in the Access-Control-Allow-Origin response header without proper validation or whitelisting.

Example: Origin: http://localhost:8888 Access-Control-Allow-Origin: http://localhost:8888 Access-Control-Allow-Credentials: true

This allows an attacker-controlled site (on a different port, like 8888) to send credentialed requests to the Strapi backend on 1337.

Suggested Fix

  • Explicitly whitelist trusted origins
  • Avoid reflecting dynamic origins

Affected packages

EcosystemPackageAffected versions
npm@strapi/core
All versions before 5.20.0 (fixed in 5.20.0)

References