MEDIUM 5.3

CVE-2026-57942: LibreTranslate IP Spoofing & Rate Limit Bypass Vulnerability

LibreTranslate versions up to 1.9.7 contain a header spoofing vulnerability that allows attackers to forge client IP addresses. By injecting fake values into the X-Forwarded-For HTTP header, unauthenticated attackers can bypass rate limiting and flood protections designed to prevent API abuse. This enables attackers to send unlimited requests from what appear to be different IP addresses, potentially exhausting service availability or overwhelming the translation API.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weaknesses (CWE)
CWE-348
Affected products
0 configuration(s)
Published / Modified
2026-06-29 / 2026-06-29

NVD description (verbatim)

LibreTranslate through 1.9.7, fixed in commit 397fd22, contains an IP spoofing vulnerability in the get_remote_address() function that allows unauthenticated attackers to spoof client IP addresses by injecting arbitrary values into the X-Forwarded-For header without trusted proxy validation. Attackers can bypass per-IP rate limiting and flood bans by supplying forged addresses in the X-Forwarded-For header to enable unlimited API abuse.

5 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in LibreTranslate's get_remote_address() function, which reads the X-Forwarded-For header to determine client IP addresses without validating whether the request originates from a trusted proxy. CWE-348 (Clumsy Cryptographic Practices) reflects improper trust of untrusted input in a security-critical context. An attacker can craft HTTP requests with arbitrary X-Forwarded-For values, causing the application to record and trust forged source IPs. This circumvents per-IP rate limiting and flood detection mechanisms that depend on accurate client identification. The fix was committed as commit 397fd22, addressing the lack of trusted proxy validation.

Business impact

Threat actors can conduct sustained API abuse attacks without triggering rate-limit blocks. This degrades service quality for legitimate users, increases infrastructure costs from handling high request volumes, and may enable targeted denial-of-service against LibreTranslate deployments. Organizations relying on rate limiting to protect their translation API are left unprotected if they run unpatched versions. The attack requires no authentication and is trivial to execute, making it attractive to competitors seeking to disrupt service or to malicious actors testing defenses.

Affected systems

LibreTranslate through version 1.9.7 is affected. The vulnerability exists in the IP address extraction logic used across all request handling, so any deployment of an unpatched version is vulnerable. Self-hosted instances and any service exposing LibreTranslate's API are in scope. No authentication is required to exploit this issue.

Exploitability

Exploitation is straightforward: an attacker sends HTTP requests with crafted X-Forwarded-For headers containing arbitrary IP addresses. The attack has a network attack vector (AV:N), requires no special access (PR:N), no user interaction (UI:N), and succeeds in uncontained scope (S:U). The low attack complexity (AC:L) means no special tools or unusual conditions are needed. The impact is availability-focused: attackers can sustain high request rates without rate-limit consequences. This is a low-to-moderate risk vulnerability with high practical exploitability for anyone seeking to flood or disrupt the service.

Remediation

Update LibreTranslate to a version incorporating commit 397fd22 or later. The fix implements trusted proxy validation so that X-Forwarded-For headers are only trusted when they originate from explicitly configured, authorized proxy servers. Organizations should also audit their deployment architecture: if LibreTranslate is not behind a trusted reverse proxy or load balancer, the X-Forwarded-For header should not be trusted at all, and the function should read only the actual TCP connection source. Consider implementing additional rate limiting at the firewall or API gateway layer, independent of application-level per-IP checks.

Patch guidance

Apply updates to LibreTranslate versions that include the fix from commit 397fd22. Verify the patched version against the official LibreTranslate release notes and repository. If you operate a self-hosted instance, pull the latest stable release or build from the patched commit. If you use LibreTranslate as a service, contact the provider to confirm they have deployed the patch. After patching, test that rate limiting functions as expected by verifying that requests from a single IP address are throttled appropriately.

Detection guidance

Monitor for suspicious patterns in X-Forwarded-For header values, particularly where the header contains IP addresses that do not correspond to legitimate proxy infrastructure. Log and alert on requests with highly variable or obviously spoofed addresses (e.g., private IP ranges, reserved addresses, or addresses from unexpected geographic regions). Review API access logs for unusual spikes in traffic from diverse IP sources within short time windows—a signature of header spoofing attacks. If rate limiting is unexpectedly ineffective, investigate whether the application is reading untrusted headers.

Why prioritize this

Although this is a MEDIUM severity issue (CVSS 5.3), it should be prioritized by teams running or consuming LibreTranslate APIs. The vulnerability directly undermines rate limiting, a foundational defense against abuse and denial-of-service. It requires no authentication, zero user interaction, and is trivial to exploit at scale. Organizations with public-facing translation APIs or those vulnerable to competitive disruption should patch promptly. The lack of confidentiality or integrity impact prevents this from being HIGH severity, but the availability risk and ease of exploitation warrant urgent remediation.

Risk score, explained

CVSS 5.3 (MEDIUM) reflects an unauthenticated, network-accessible vulnerability with low attack complexity that impacts availability (via circumvented rate limiting) but does not directly compromise confidentiality or integrity. The scope is unchanged, and no special privileges are required. The score accurately captures that this is a focused denial-of-service risk rather than a system-wide compromise threat, but the practical exploitability and ease of abuse elevate concern within organizations relying on API rate limiting for operational resilience.

Frequently asked questions

If I'm behind a trusted reverse proxy, am I still vulnerable?

Only if the reverse proxy is properly configured to sanitize or validate X-Forwarded-For headers before passing them to LibreTranslate. If your proxy simply forwards the header as-is without validation, an attacker can still spoof addresses through the proxy. Verify that your proxy is configured to only trust its own X-Forwarded-For entries and that it strips or overwrites untrusted headers from upstream requests.

Can I mitigate this without upgrading immediately?

Partial mitigation is possible: configure your firewall or API gateway to enforce strict rate limiting based on the actual TCP source IP (not the X-Forwarded-For header), implement request validation to reject obviously malformed addresses, and restrict which clients are allowed to set the X-Forwarded-For header. However, these workarounds do not eliminate the underlying vulnerability. Patching is the definitive fix.

Does this vulnerability expose my translation data or user information?

No. The vulnerability allows IP spoofing to bypass rate limiting and cause availability disruption. It does not grant access to stored data, authentication tokens, or translation logs. Confidentiality and integrity of data are not compromised, though service availability can be degraded by attackers exploiting unlimited request capacity.

How do I verify the patch is applied correctly?

After updating, test rate limiting by sending multiple requests from a single IP address in rapid succession and confirm that requests are throttled or rejected as configured. Check the LibreTranslate version string and commit hash against the official repository to confirm you are running a version that includes commit 397fd22 or later.

This analysis is provided for informational purposes and reflects publicly available CVE data and security best practices as of the publication date. Security vulnerabilities evolve; consult the official LibreTranslate project repository, vendor security advisories, and your organization's risk management policies for the latest guidance. Patch versions and release dates should be verified against authoritative vendor sources before deployment. SEC.co does not warrant the accuracy or completeness of this analysis and disclaims liability for actions taken based on this information. Source: NVD (public-domain), retrieved 2026-08-08. Analysis generated by SEC.co (claude-haiku-4-5).