Skip links

CORS Misconfiguration Testing

That “allow all origins” setting might be quietly handing out access

Your app’s frontend and its API probably live on different domains, or at least different subdomains. That’s normal, most modern web apps work this way. CORS is the mechanism that lets a browser know which of those domains are actually trusted to talk to each other. When it’s set up too loosely, that trust extends to places it really shouldn’t, and suddenly a malicious website can reach into your API through a victim’s own browser and pull out data they were never supposed to see.

We test your CORS configuration to find exactly where that’s happening, and where a setting that looked harmless is actually a door left ajar.

What this actually is

CORS lets a server say “these origins are allowed to access my resources.” Done properly, that means only trusted domains get through, and credentials, cookies, authorization headers, whatever your app uses, get handled with real care.

We go through your CORS headers and how your application actually behaves, looking for configurations that quietly expose sensitive data or make unauthorized access easier than it should be.

Why this matters even when everything else looks solid

Here’s the uncomfortable part: a CORS policy that’s too permissive can undermine an application with genuinely strong authentication and authorization elsewhere. The login screen can be bulletproof, and none of that matters if a malicious site can just ask your API for protected data from a completely untrusted origin and get a yes.

This kind of testing finds untrusted origins that shouldn’t have access, wildcard settings sitting on sensitive endpoints where they don’t belong, origin values that get blindly reflected back, credentials handled carelessly, weak validation on the Origin header, and preflight requests that aren’t actually restricting anything.

Worth noting: not every CORS oddity is immediately dangerous. The real risk depends on authentication, what the endpoint actually returns, and how the browser behaves. That’s exactly why testing matters more than just reading a header and panicking, or worse, reading a header and shrugging.

What we actually check

The headers themselves. We go through Access-Control-Allow-Origin, Access-Control-Allow-Credentials, Access-Control-Allow-Methods, Access-Control-Allow-Headers, Access-Control-Expose-Headers, and Access-Control-Max-Age, checking whether any of them grant more access than the application genuinely needs.

Origin validation. We test how your app reacts to different origins. Does it only accept approved domains, or will it accept basically anything? Does it reflect back whatever Origin header it’s handed? Does it trust subdomains it shouldn’t, or domains that just look similar to a legitimate one? Does it handle null or unusual origin values safely, or does that slip through unnoticed?

Credentialed requests. If your app uses cookies or other credentials, this part matters a lot. We check whether sensitive resources become reachable cross-origin once credentials are included, and whether that lines up with what your authentication setup was actually meant to allow.

Wildcard origins. A wildcard can be perfectly reasonable for genuinely public resources. It’s a different story entirely when it’s sitting on an endpoint that returns sensitive data or authenticated functionality. We check where wildcards show up and whether they belong there.

Preflight requests. Some cross-origin requests trigger a browser preflight using OPTIONS before the real request goes through. We check whether that preflight response is actually restricting origins, methods, headers, and credential use, or whether it’s just rubber-stamping everything that asks.

API endpoints. Browser-accessible APIs are where CORS problems tend to matter most. We test whether sensitive data can be pulled, or actions performed, from an origin that has no business being there.

Sensitive data exposure. A loose CORS setting becomes a real problem the moment the affected endpoint returns anything worth stealing: user profiles, account details, business data, internal information, personal data, transaction records. We check what’s actually reachable.

Origin reflection. Some applications just echo back whatever Origin value shows up in the request. We check whether that’s properly validated, or whether an attacker-controlled origin can simply claim to be trusted and get treated as such.

How we run this

Scope and planning. We start by identifying the applications, APIs, domains, and subdomains that are actually in play.

Discovery. We map browser-accessible endpoints and understand how the application talks across origins in practice.

Configuration review. We inspect CORS headers and server responses across the relevant endpoints.

Origin testing. We test both trusted and untrusted origins to see how the application actually validates cross-origin requests, not just how it’s supposed to.

Credential testing. Where it applies, we check whether authenticated requests can succeed from an unauthorized origin, and what that origin gets back in return.

Preflight and method testing. We review OPTIONS handling and test different HTTP methods and headers to see what’s genuinely being restricted.

Impact validation. We confirm whether a finding actually exposes data, enables unauthorized action, or otherwise creates a real security impact, rather than just flagging something that looks unusual on paper.

Reporting and retesting. You get a clear report on the affected endpoints, the evidence, and the risk. Once you’ve made changes, we can retest to confirm they held.

What tends to show up

Permissive CORS policies. Arbitrary origins accepted without question. Unsafe origin reflection. Wildcard origins sitting on sensitive endpoints. Careless credential handling. Weak origin validation. Overly broad allowed methods and headers. Preflight configuration that doesn’t actually restrict anything. Cross-origin access to APIs that should be locked down. Inconsistent policies across different endpoints. Development or staging environments with far looser settings than production, quietly left that way.

CORS vs. the Same-Origin Policy

The Same-Origin Policy is the browser’s built-in default, restricting how content from different origins can interact. CORS is the mechanism that lets a server deliberately relax that restriction for trusted cases. They’re connected, but they’re not the same thing. A weak CORS configuration essentially tells the browser to loosen protections that developers often assume are still in place. That gap between assumption and reality is exactly where problems live.

CORS vs. CSRF

These get confused often, but they’re solving different problems. CSRF is about a malicious site tricking a victim’s browser into performing an action using their already-authenticated session. CORS is about whether a browser-based script from another origin can actually read the response it gets back. An application can have CORS issues, CSRF issues, or both at once, and testing them separately gives you a much clearer picture of what’s actually wrong.

Who this is for

Web applications, REST APIs, browser-based SaaS platforms, single-page applications, e-commerce platforms, banking and financial applications, healthcare applications, customer portals, enterprise applications, and microservice-based platforms.

It matters most whenever your frontend and your API live on different origins, which describes the vast majority of modern web architecture.

When to test

Before launching a new web application. Before releasing a public API. After major API or authentication changes. After changing domains or subdomains. After moving to a new environment. During regular security assessments. After any security configuration change. Following a migration. When integrating a third-party web application.

Regular testing matters because CORS settings drift. Something that was locked down six months ago can quietly loosen after an unrelated change nobody thought to double-check.

Why work with us

We look at CORS the way it actually affects your application, not just as a list of headers that look slightly unusual. That means understanding how your CORS settings interact with authentication, authorization, your APIs, and the sensitive data behind them. We separate configurations that are intentionally permissive for genuinely public resources from settings that are quietly exposing something they shouldn’t. Every finding comes with clear evidence, real risk context, and a practical fix, and once you’ve made changes, we can retest to confirm they worked.

Bottom line

CORS is one of those settings that’s easy to get almost right, and almost right is exactly where the risk hides. A configuration that’s a little too broad can hand access to origins that should never have been trusted in the first place, even when everything else about your app looks secure. Testing your origins, credentials, headers, preflight behavior, and sensitive endpoints tells you whether your cross-origin policy is actually doing what you think it’s doing.

FAQs

What is CORS misconfiguration?
When cross-origin access controls are set too broadly or incorrectly, potentially letting unauthorized websites interact with resources they shouldn’t reach.

Can it actually expose sensitive data?
Yes, depending on the application and its authentication setup. If a sensitive endpoint allows an untrusted origin and returns protected information, that’s a real risk, not a theoretical one.

Is this the same as CSRF?
No. CORS is about cross-origin browser access. CSRF is about unauthorized actions using someone’s authenticated session. Related, but genuinely different problems.

Does every wildcard mean I’m vulnerable?
No. A wildcard on a genuinely public resource is fine. Its risk depends entirely on what’s being exposed, whether authentication is involved, and how the endpoint is actually used.

Can this be tested on APIs?
Yes, and it’s especially relevant there. Browser-accessible REST APIs and similar architectures are exactly where CORS testing tends to matter most.

How often should we check this?
Whenever you do a security assessment, and definitely after major changes to APIs, authentication, domains, frontend applications, or server configuration.

What’s in the report?
Affected endpoints, observed behavior, evidence, risk context, potential impact, remediation recommendations, and retesting results once fixes are in.

Secure your web applications with CORS Misconfiguration Testing

Talk to Sunvak Boreal about your applications and APIs. Let’s find out whether your cross-origin settings are actually as tight as you think.