thttpd 2.2x - 'defang' Remote Buffer Overflow (PoC)
| Reporter | Title | Published | Views | Family All 19 |
|---|---|---|---|---|
| thttpd < 2.24 Host:' Header Traversal File Access / libhttpd.c defang Overflow | 18 Aug 200400:00 | – | nessus | |
| thttpd/mini_httpd Virtual Hosting File Disclosure | 18 Aug 200400:00 | – | nessus | |
| thttpd/mini_httpd < 2.24 Virtual Hosting File Disclosure | 18 Aug 200400:00 | – | nessus | |
| Debian DSA-396-1 : thttpd - missing input sanitizing, wrong calculation | 29 Sep 200400:00 | – | nessus | |
| SuSE-SA:2003:044: thttpd | 25 Jul 200400:00 | – | nessus | |
| thttpd Host Header Traversal Arbitrary File Access | 6 May 200300:00 | – | nessus | |
| CAN-2003-0899 | 6 Aug 202410:24 | – | cve | |
| CVE-2003-0899 | 30 Oct 200305:00 | – | cve | |
| CVE-2003-0899 | 2 Feb 202417:16 | – | circl | |
| CVE-2003-0899 | 30 Oct 200305:00 | – | cvelist |
10
/*
source: https://www.securityfocus.com/bid/8906/info
A vulnerability has been reported in thttpd that may allow a remote attacker to execute arbitrary code on vulnerable host. The issue is reported to exist due to a lack of bounds checking by software, leading to a buffer overflow condition. The problem is reported to exist in the defang() function in libhttpd.c.
This issue may allow an attacker to gain unauthorized access to a vulnerable host. Successful exploitation of this issue may allow an attacker to execute arbitrary code in the context of the web server in order to gain unauthorized access to a vulnerable system.
thttpd versions 2.21 to 2.23b1 have been reported to be prone to this issue, however other versions may be affected as well.
*/
static void
defang( char* str, char* dfstr, int dfsize )
{
char* cp1;
char* cp2;
for ( cp1 = str, cp2 = dfstr;
*cp1 != '\0' && cp2 - dfstr < dfsize - 1;
++cp1, ++cp2 )
{
switch ( *cp1 )
{
case '<':
*cp2++ = '&';
*cp2++ = 'l';
*cp2++ = 't';
*cp2 = ';';
break;
case '>':
*cp2++ = '&';
*cp2++ = 'g';
*cp2++ = 't';
*cp2 = ';';
break;
default:
*cp2 = *cp1;
break;
}
}
*cp2 = '\0';
}Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
15 Nov 2017 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.5
CVSS 3.19.8
EPSS0.21679