Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-45597 Overview
CVE-2024-45597 is a CRLF injection vulnerability [CWE-93] in Pluto, a superset of Lua 5.4 focused on general-purpose programming. The flaw affects scripts that pass user-controlled values into http.request header values. An attacker can inject newline characters to smuggle additional HTTP headers or forge arbitrary requests. Because header tables commonly carry authentication tokens, injected requests may inherit credentials and reach unintended endpoints.
Critical Impact
Attackers can manipulate outbound HTTP requests, potentially leveraging authentication tokens present in the same headers table to access unauthorized resources.
Affected Products
- Pluto-lang Pluto (all versions prior to the patched release)
- Applications embedding Pluto scripts that forward user input into HTTP headers
- Downstream tools relying on the http.request API with unsanitized header values
Discovery Timeline
- 2024-09-10 - CVE-2024-45597 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-45597
Vulnerability Analysis
Pluto exposes an http.request function that accepts a table of HTTP headers. The library did not validate header values for Carriage Return Line Feed (CRLF) sequences before serializing them onto the wire. An attacker who influences a header value can append \r\n sequences, terminating the current header and injecting arbitrary headers or an entire second request. This behavior maps to CWE-93 (Improper Neutralization of CRLF Sequences).
The scope is limited to scripts that pipe untrusted input directly into header fields. Impact centers on integrity of outbound requests rather than confidentiality of local data, aligning with the low integrity impact classification.
Root Cause
The Pluto HTTP client failed to neutralize CRLF control characters in header values before constructing the raw HTTP request. HTTP treats \r\n as a header terminator per RFC 7230. Without sanitization, any attacker-controlled substring becomes a vehicle for header smuggling.
Attack Vector
Exploitation requires a Pluto script that forwards attacker-influenced data (query parameters, form fields, message contents) into an http.request header value. The attacker supplies a payload containing embedded CRLF sequences followed by crafted header lines or a full request body. When Pluto issues the request, the server receives the injected content as legitimate protocol elements.
Because authentication tokens frequently sit alongside user data in the same headers table, injected requests can carry those tokens to attacker-selected paths or hosts, enabling authenticated actions the original script never intended.
No working exploit code is published in the referenced advisories. See the GitHub Security Advisory GHSA-w8xp-pmx2-37w7 for the maintainer's technical description.
Detection Methods for CVE-2024-45597
Indicators of Compromise
- Outbound HTTP requests originating from Pluto processes containing unexpected headers or duplicate Host fields
- Log entries where header values contain literal %0d%0a, \r\n, or raw CR/LF byte sequences
- Requests to unfamiliar external endpoints from services that embed the Pluto runtime
Detection Strategies
- Perform static code review of Pluto scripts for calls to http.request where header table values derive from untrusted input sources
- Inspect network telemetry for HTTP requests with anomalous header structure, such as multiple Authorization headers or truncated first lines
- Add web application firewall (WAF) rules on egress proxies to reject header values containing raw CR or LF bytes
Monitoring Recommendations
- Log full outbound HTTP request headers from applications hosting Pluto scripts and forward them to a centralized analytics platform
- Alert on unusual destination hosts or authenticated requests to endpoints outside documented integrations
- Track version strings of the Pluto runtime across managed hosts to identify unpatched deployments
How to Mitigate CVE-2024-45597
Immediate Actions Required
- Upgrade Pluto to the version incorporating pull request #945, which introduces header value validation
- Audit all Pluto scripts that construct HTTP requests and enumerate header values sourced from external input
- Rotate any authentication tokens or API keys that may have been exposed through affected scripts
Patch Information
The maintainers merged the fix in PlutoLang/Pluto PR #945. The patch rejects header values containing CRLF sequences before dispatch. Details are documented in the GHSA-w8xp-pmx2-37w7 advisory.
Workarounds
- Sanitize input at the application layer by stripping or rejecting \r and \n characters before passing values into http.request headers
- Segregate authentication tokens from user-influenced headers by issuing HTTP requests through a dedicated wrapper that hardcodes sensitive header values
- Route outbound traffic through an egress proxy that enforces strict HTTP header syntax and blocks CRLF-bearing values
# Example input sanitization in a Pluto wrapper function
# Reject header values containing CR or LF before invoking http.request
function safe_header(value)
if string.find(value, "[\r\n]") then
error("invalid header value: CRLF not permitted")
end
return value
end
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

