CVE-2026-59702: repomix Server-Side Request Forgery
An unauthenticated server-side request forgery (SSRF) vulnerability, CVE-2026-59702, in repomix's POST /api/pack endpoint allows attackers to make arbitrary outbound requests, potentially leading to internal network reconnaissance, access to cloud metadata services, and local filesystem path enumeration.
CVE-2026-59702 identifies a critical server-side request forgery (SSRF) vulnerability within the repomix software, specifically affecting its POST /api/pack endpoint. This flaw enables unauthenticated attackers to supply arbitrary URLs using http://, https://, and file:// schemes. These malformed URLs are then processed by an internal git clone function without sufficient validation, causing the server to initiate connections to attacker-specified internal or external resources. The vulnerability, rated with a CVSS v3.1 base score of 9.3, presents a significant risk to organizations using repomix. Successful exploitation can expose sensitive internal network configurations, cloud metadata (such as from GCP), or local filesystem paths, leading to data exfiltration or further compromise.
Attack Chain
- Vulnerable Service Identification: An attacker identifies a publicly accessible instance of
repomixexposing the/api/packendpoint. - Malicious Request Crafting: The attacker constructs a
POSTrequest to/api/pack, embedding a crafted URL as a parameter, such asurl=http://169.254.169.254/latest/meta-data/orurl=file:///etc/passwd. - Lack of Validation: The
repomixapplication receives the request and, due to improper input validation, accepts the malicious URL. - Internal Request Trigger: The application's
git clonefunction attempts to resolve and connect to the provided URL, initiating an arbitrary outbound request from the server's perspective. - Information Disclosure/Access: The server connects to the internal resource (e.g., a private IP address, a cloud metadata service, or a local file path).
- Data Exfiltration: The attacker receives the response from the internal resource through the
repomixapplication, gaining access to sensitive information like cloud credentials, internal service details, or configuration files. - Pivoting: The attacker uses the gathered information to map the internal network, discover additional vulnerabilities, or escalate privileges within the compromised environment.
Impact
The impact of successful exploitation of CVE-2026-59702 is substantial, allowing unauthenticated attackers to perform extensive reconnaissance of internal network assets. This includes the ability to access sensitive cloud metadata services, such as those used by Google Cloud Platform (GCP), which can yield valuable credentials or configuration data. Furthermore, attackers can enumerate and potentially access local filesystem paths on the vulnerable server, leading to the exposure of configuration files, user data, or even arbitrary file read. This information disclosure can directly facilitate further compromise, data exfiltration, or lateral movement within an organization's infrastructure.
Recommendation
- Immediately patch
repomixto address CVE-2026-59702 as soon as a fix becomes available from the vendor. - Deploy the Sigma rule "Detects CVE-2026-59702 Exploitation - repomix SSRF Attempt" to your SIEM and tune for your environment to identify suspicious
POSTrequests. - Enable comprehensive web server logging for
POSTrequest bodies and query parameters for any application exposing an/api/packendpoint to capture potential exploitation attempts of this vulnerability.
Detection coverage 1
Detects CVE-2026-59702 Exploitation - repomix SSRF Attempt
highDetects CVE-2026-59702 exploitation attempts against the repomix /api/pack endpoint by identifying specific URL schemes or internal/metadata service IP addresses in the query string, indicative of Server-Side Request Forgery.
Detection queries are available on the platform. Get full rules →