CVE-2026-2940
Received Received - Intake
Out-of-Bounds Write in tiny_web_server URL Handler Allows Remote Exploit

Publication date: 2026-02-22

Last updated on: 2026-04-29

Assigner: VulDB

Description
A vulnerability was determined in Zaher1307 tiny_web_server up to 8d77b1044a0ca3a5297d8726ac8aa2cf944d481b. This affects the function tiny_web_server/tiny.c of the file tiny_web_server/tiny.c of the component URL Handler. This manipulation causes out-of-bounds write. The attack can be initiated remotely. The exploit has been publicly disclosed and may be utilized. Continious delivery with rolling releases is used by this product. Therefore, no version details of affected nor updated releases are available. The project was informed of the problem early through an issue report but has not responded yet.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-22
Last Modified
2026-04-29
Generated
2026-05-07
AI Q&A
2026-02-22
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
zaher1307 tiny_web_server to 8d77b1044a0ca3a5297d8726ac8aa2cf944d481b (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-119 The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-2940 is a stack buffer overflow vulnerability in the tiny_web_server project, specifically in the client_error() function located in tiny.c.

The vulnerability arises because the client_error() function uses the sprintf() function to format error messages into a fixed-size stack buffer without proper bounds checking.

When a requested file is not found, client_error() is called with the filename parameter containing the user-controlled HTTP request URI. If this URI is excessively long (around 8160 bytes or more), the sprintf() call writes more data than the buffer can hold, causing a stack buffer overflow.

This overflow can overwrite adjacent stack memory, potentially allowing an attacker to execute arbitrary code, cause a denial of service, or disclose information.

The vulnerability can be exploited remotely by sending an HTTP GET request with a maliciously long URI.


How can this vulnerability impact me? :

This vulnerability can impact you by compromising the confidentiality, integrity, and availability of the system running the affected tiny_web_server.

An attacker can remotely exploit the vulnerability without authentication by sending a specially crafted HTTP request with an overly long URI.

Successful exploitation may lead to arbitrary code execution, allowing the attacker to run malicious code on the server.

It can also cause denial of service by crashing the server due to the stack buffer overflow.

Information disclosure is another possible impact if the overflow corrupts memory in a way that leaks sensitive data.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': 'This vulnerability can be detected by monitoring for unusually long HTTP GET requests with excessively long URIs (β‰₯ 8160 bytes) targeting the tiny_web_server. Specifically, an exploit sends a crafted GET request with a very long URI to trigger the stack buffer overflow in the client_error() function.'}, {'type': 'paragraph', 'content': 'To detect exploitation attempts, you can capture and analyze HTTP traffic for GET requests with abnormally long URIs.'}, {'type': 'paragraph', 'content': 'Example commands to detect such attempts include using network packet capture tools like tcpdump or tshark to filter HTTP GET requests with long URIs:'}, {'type': 'list_item', 'content': "tcpdump -i <interface> -A 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) > 8160)'"}, {'type': 'list_item', 'content': 'tshark -i <interface> -Y \'http.request.method == "GET" and len(http.request.uri) >= 8160\' -T fields -e http.request.uri'}, {'type': 'paragraph', 'content': 'Additionally, AddressSanitizer or similar runtime memory error detectors can be used during testing or debugging to detect stack buffer overflows in the tiny_web_server binary.'}] [1, 4]


What immediate steps should I take to mitigate this vulnerability?

There are no known patches or official mitigations available for this vulnerability as the project maintainers have not responded or provided fixes.

Immediate mitigation steps include:

  • Disabling or removing the affected tiny_web_server from production environments to prevent exploitation.
  • Restricting network access to the tiny_web_server to trusted hosts only, using firewalls or network segmentation.
  • Monitoring network traffic for suspiciously long HTTP GET requests as indicators of exploitation attempts.
  • Considering replacing tiny_web_server with a more secure and actively maintained web server product.

Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart