Miggo Logo

CVE-2024-56140:
Atro CSRF Middleware Bypass (security.checkOrigin)

5.9

CVSS Score
3.1

Basic Information

EPSS Score
0.09074%
Published
12/18/2024
Updated
12/18/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
astronpm< 4.16.174.16.17

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the middleware's Content-Type handling in createOriginCheckMiddleware. The original code used FORM_CONTENT_TYPES.includes(contentType.toLowerCase()) which required exact MIME type matches, failing to account for: 1) parameters in Content-Type headers (application/x-www-form-urlencoded; abc), and 2) requests without Content-Type headers. The patched commit introduced hasFormLikeHeader with .includes() checks and separate handling for missing headers, confirming these were the vulnerable code paths. The file path and function name are explicitly referenced in both the vulnerability details and commit diff.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry * *u* in *stro’s *SR*-prot**tion mi**l*w*r* *llows r*qu*sts to *yp*ss *SR* ****ks. ### **t*ils W**n t** `s**urity.****kOri*in` *on*i*ur*tion option is s*t to `tru*`, *stro mi**l*w*r* will p*r*orm * *SR* ****k. (Sour** *o**: *ttps://*it

Reasoning

T** vuln*r**ility st*ms *rom t** mi**l*w*r*'s *ont*nt-Typ* **n*lin* in *r**t*Ori*in****kMi**l*w*r*. T** ori*in*l *o** us** *ORM_*ONT*NT_TYP*S.in*lu**s(*ont*ntTyp*.toLow*r**s*()) w*i** r*quir** *x**t MIM* typ* m*t***s, **ilin* to ***ount *or: *) p*r*m