Skip to content

FoodCoopShop Server-Side Request Forgery vulnerability

High severity GitHub Reviewed Published Nov 2, 2023 in foodcoopshop/foodcoopshop • Updated Nov 9, 2023

Package

composer foodcoopshop/foodcoopshop (Composer)

Affected versions

>= 3.2.0, < 3.6.1

Patched versions

3.6.1

Description

There is a potential SSRF vulnerability in foodcoopshop. Since there is no security policy on your Github, I tried to use the emails to contact you.

The potential issue is in the Network module, where a manufacturer account can use the /api/updateProducts.json endpoint to make the server send a request to arbitrary host.
For example, use

data[data][0][remoteProductId]=352&data[data][0][image]=http://localhost:8888/

will make the server send a request to localhost:8888. This means that it can be used as a proxy into the internal network where the server is.

To make matters worse, the checks on valid image is not enough. There is time of check time of use issue there.
For example, by using a custom server that returns 200 on HEAD requests, then return a valid image on first GET request and then a 302 redirect to final target on second GET request, the server will copy whatever file
at the redirect destination, making this a full SSRF.
(An example python server that can do this is at https://pastebin.com/8K5Brwbq This will make the server download whatever at the redirect target)

You can check https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html for more information on SSRF, their impact and how to properly fix it.

Regards

References

@mrothauer mrothauer published to foodcoopshop/foodcoopshop Nov 2, 2023
Published by the National Vulnerability Database Nov 2, 2023
Published to the GitHub Advisory Database Nov 2, 2023
Reviewed Nov 2, 2023
Last updated Nov 9, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

EPSS score

0.116%
(47th percentile)

CVE ID

CVE-2023-46725

GHSA ID

GHSA-jhww-fx2j-3rf7

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.