Description
SparkyFitness before 0.17.0 contains a missing authorization vulnerability that allows authenticated users to delete other users' food variants via the DELETE /api/foods/food-variants/:id endpoint. Attackers can use variant IDs from public food read endpoints to delete serving and nutrition variants of publicly shared foods, destroying victims' data.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| CodeWithCJ | SparkyFitness | < 0.17.0 | 0.17.0 |
References
- GitHub Security Advisory (GHSA-qph8-6xrr-7xjw) vendor-advisory
- https://github.com/CodeWithCJ/SparkyFitness/commit/79215eb4d6dda12262e1bb15b76dceb0e37f6fa1 patch
- SparkyFitness v0.17.0 Release Notes release-notes
- https://github.com/CodeWithCJ/SparkyFitness/blob/v0.16.9/SparkyFitnessServer/services/foodCoreService.ts#L479-L498 technical-description
- VulnCheck Advisory: SparkyFitness before 0.17.0 Missing Authorization via food-variants DELETE Endpoint third-party-advisory