Description
OpenHealth through 0.2.0 contains a missing authentication and authorization vulnerability in the /api/health-data/[id] GET, PATCH and DELETE handlers that query records by id without session or authorId checks. Unauthenticated attackers who know a HealthData record id can read another user's medical record data and file metadata, overwrite it with arbitrary JSON, or delete it.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| OpenHealthForAll | OpenHealth | ≤ 0.2.0 | — |
References
- https://hackmd.io/@hieuPenguinnn/open-health-health-data-id-missing-auth-idor third-party-advisory
- https://github.com/OpenHealthForAll/open-health/blob/v0.2.0/src/app/api/health-data/%5Bid%5D/route.ts#L13-L43 technical-description
- https://github.com/OpenHealthForAll/open-health/blob/v0.2.0/src/middleware.ts#L20 technical-description
- https://github.com/OpenHealthForAll/open-health product
- VulnCheck Advisory: OpenHealth through 0.2.0 Missing Authentication via /api/health-data/[id] Route third-party-advisory