Description
Marmite through 0.4.2 contains a path traversal vulnerability in the development server started by --serve that allows unauthenticated attackers to read arbitrary files. The handle_request function in src/server.rs fails to reject .. segments after percent-decoding and joining the request path to the output folder, enabling attackers to request encoded traversal sequences to access files readable by the marmite process.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| rochacbruno | marmite | ≤ 0.4.2 | — |
References
- GitHub Issue #554 issue-tracking
- https://github.com/rochacbruno/marmite/blob/4b2ddbd7595233b2e1d0086e18490fec49705098/src/server.rs#L180-L315 technical-description
- https://github.com/rochacbruno/marmite/commit/303a0bf2fff4302f4164c0c39932fdffc6683ad4 mitigation patch
- https://github.com/rochacbruno/marmite product
- VulnCheck Advisory: Marmite through 0.4.2 Path Traversal via Development Server third-party-advisory