# CVE-2026-59702: Repomix SSRF and LFI in POST /api/pack endpoint

Source: https://junglewise.ai/threats/cve-2026-59702-repomix-ssrf-and-lfi-in-post-api-pack-endpoint  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-08. Updated: 2026-07-08  
License: CC BY 4.0 with a link back

CVE-2026-59702 · Severity: critical · CVSS 9.3 · Published 2026-07-08

Repomix is a tool used to package entire code repositories into a single file for use with AI models. A security flaw in its web service allows unauthenticated attackers to force the server to make unauthorized requests to internal network addresses or local files. This could lead to the exposure of sensitive cloud metadata, private internal services, or local system files.

## Quick answers

**Is CVE-2026-59702 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59702 being exploited in the wild.

**How severe is CVE-2026-59702?** Critical severity, with a CVSS score of 9.3, published 8 July 2026.

**Which products and versions are affected?** repomix repomix < 1.14.1.

**Is there a fix for CVE-2026-59702?** A patch was published on 2026-07-06: Fix committed to repository Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59702 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2026-59702?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A Server-Side Request Forgery (SSRF) vulnerability exists in the POST /api/pack endpoint of the Repomix web server. The application fails to properly validate repository URLs before passing them to the 'git clone' command. Specifically, the validation logic does not block http://, https://, or file:// protocols pointing to private IP ranges, cloud metadata services (like GCP's metadata server), or local filesystem paths. An unauthenticated remote attacker can exploit this to perform internal port scanning, access sensitive cloud service-account tokens, or read local files via the file:// protocol. The issue was addressed by enforcing an HTTPS-only allowlist and blocking private/reserved hostnames before the git sink.

## Affected products

- repomix repomix < 1.14.1

## Timeline

- 2026-06-02: disclosed: Initial report to vendor
- 2026-07-06: patched: Fix committed to repository
- 2026-07-08: advisory: CVE published

## References

- [https://github.com/CrazyForks/repomix/commit/c748b524f41225e7fc6f89ad0084520901a453cf](https://github.com/CrazyForks/repomix/commit/c748b524f41225e7fc6f89ad0084520901a453cf)
- [https://github.com/yamadashy/repomix](https://github.com/yamadashy/repomix)
- [https://github.com/yamadashy/repomix/issues/1703](https://github.com/yamadashy/repomix/issues/1703)
- [https://www.vulncheck.com/advisories/repomix-server-side-request-forgery-via-unvalidated-repository-urls-in-post-api-pack](https://www.vulncheck.com/advisories/repomix-server-side-request-forgery-via-unvalidated-repository-urls-in-post-api-pack)
