Miggo Logo

CVE-2016-10549: Sails before 0.12.7 vulnerable to Broken CORS

N/A

CVSS Score

Basic Information

EPSS Score
0.48618%
Published
2/18/2019
Updated
1/11/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
sailsnpm< 0.12.70.12.7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability manifests when Sails' CORS configuration uses dangerous defaults (allRoutes:true + origin:'*'). The initialize function in lib/hooks/cors/index.js is responsible for processing these configurations. The commit diff shows added warnings for unsafe combinations, confirming this is where permissive settings are evaluated. While no single function contains a traditional code flaw, the CORS hook's configuration handling logic becomes vulnerable when misconfigured, making the initialize routine the focal point of the security weakness.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*****t** v*rsions o* `s*ils` **v* *n issu* wit* t** *ORS *on*i*ur*tion w**r* t** v*lu* o* t** ori*in *****r is r**l**t** *s t** v*lu* *or t** `****ss-*ontrol-*llow-Ori*in` *****r. T*is m*y *llow *n *tt**k*r to m*k* *J*X r*qu*sts to vuln*r**l* *osts t

Reasoning

T** vuln*r**ility m*ni**sts w**n S*ils' *ORS *on*i*ur*tion us*s **n**rous ****ults (*llRout*s:tru* + ori*in:'*'). T** `initi*liz*` *un*tion in `li*/*ooks/*ors/in**x.js` is r*sponsi*l* *or pro**ssin* t**s* *on*i*ur*tions. T** *ommit *i** s*ows ***** w