← Reference
Exposure

Any website can read responses from your API

Overly permissive cross-origin policy

What this means

Your app tells browsers that any website may read its responses, and in some cases may do so with the visitor's credentials attached.

Why it matters

This turns every page your users visit into a possible attacker: a malicious site can quietly query your API as the signed-in user and read the answer. The user sees nothing.

How to fix it

  • Allow only the origins that genuinely need access, and never combine a wildcard with credentials.

Prompt for your AI agent

Restrict the cross-origin policy to the specific origins that need it, and do not allow credentials together with a wildcard origin.

Verify the fix: request the API from an unrelated origin and confirm the browser refuses to read the response

ClassificationCWE-942 · A05:2021
Referencescwe.mitre.org
Is your app doing this?
Find out in about a minute — the first scan is free.
Scan your app
Any website can read responses from your API — seleth