@strapi/admin
Affected
- introduced
0, fixed4.25.2(semver)
Fixed versions
4.25.2
Fix
- Fixed version
4.25.2npm install @strapi/[email protected]
Advisory
Also known as: CVE-2024-52588
Strapi allows Server-Side Request Forgery in Webhook function
Description
In Strapi latest version, at function Settings -> Webhooks, the application allows us to input a URL in order to create a Webook connection. However, we can input into this field the local domains such as localhost, 127.0.0.1, 0.0.0.0,.... in order to make the Application fetching into the internal itself, which causes the vulnerability Server - Side Request Forgery (SSRF).
Payloads
http://127.0.0.1:80 -> The Port is not openhttp://127.0.0.1:1337 -> The Port which Strapi is running onSteps to Reproduce
http://127.0.0.1:80 into the URL field, and click "Save".CleanShot 2024-06-04 at 22 45 17@2x
CleanShot 2024-06-04 at 22 47 50@2x
request to http://127.0.0.1/ failed, reason: connect ECONNREFUSED 127.0.0.1:80, BECAUSE the Port 80 is not open, since we are running Strapi on Port 1337, let's change the URL we input above into http://127.0.0.1:1337CleanShot 2024-06-04 at 22 50 13@2x
CleanShot 2024-06-04 at 22 53 25@2x
Method Not Allowed, which means that there actually is a Port 1337 running the machine.PoC
Here is the Poc Video, please check:
https://drive.google.com/file/d/1EvVp9lMpYnGLmUyr16gQ_2RetI-GqYjV/view?usp=sharing
Impact
Medium Basis: The source's own band: MODERATE
0, fixed 4.25.2 (semver)4.25.2
4.25.2npm install @strapi/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0