Skip to content
OpenAdvisories

Weakness (CWE)

CWE-121: Stack-based Buffer Overflow

Variant Draft

The product writes past the end of a buffer that was allocated on the stack.

How to prevent it (5 mitigations)
  1. Operation, Build and Compilation

    Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking.

    D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.

  2. Architecture and Design

    Use an abstraction library to abstract away risky APIs. Not a complete solution.

  3. Implementation

    Implement and perform bounds checking on input.

  4. Implementation

    Do not use dangerous functions such as gets. Use safer, equivalent functions which check for boundary errors.

  5. Operation, Build and Compilation

    Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code.

    Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as "rebasing" (for Windows) and "prelinking" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking.

    For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].

Source: MITRE CWE-121

573 results · Clear filters · Feed

  • Critical 9.8

    A stack-based buffer overflow vulnerability exists in the httpd manage_request functionality of Yifan YF325 v1.0_202211…

  • Critical 9.8

    Buffer Copy without Checking Size of Input in WLAN Firmware

    Memory corruption in WLAN Firmware while doing a memory copy of pmk cache.

  • Critical 9.8

    Rockwell Automation Select Logix Communication Modules Vulnerable to Email Object Buffer Overflow

    A buffer overflow vulnerability exists in the Rockwell Automation select 1756-EN* communication devices. If exploited, a threat actor could potentially leverage this vulnerability to perform a remote code execution. To exploit this vulnerability, a threat act…

  • Critical 9.8

    Tenda AC8 formSetDeviceName stack-based overflow

    A vulnerability was found in Tenda AC8 16.03.34.06_cn_TDC01. It has been declared as critical. Affected by this vulnerability is the function formSetDeviceName. The manipulation leads to stack-based buffer overflow. The attack can be launched remotely. The ex…

  • Critical 9.0

    Juplink RX4-1500 Stack-based Buffer Overflow Vulnerability

    A stack-based buffer overflow exists in Juplink RX4-1500, a WiFi router, in versions 1.0.2 through 1.0.5. An authenticated attacker can exploit this vulnerability to achieve code execution as root.

  • Critical 9.8

    A stack-based overflow vulnerability [CWE-124] in Fortinet FortiOS version 7.0.0 through 7.0.10 and 7.2.0 through 7.2.3…

  • Critical 9.8

    A buffer overflow vulnerability exists in the uhttpd login functionality of Milesight UR32L v32.3.0.5. A specially craf…

  • Critical 9.8

    cpdb-libs vulnerable to buffer overflows via scanf

    cpdb-libs provides frontend and backend libraries for the Common Printing Dialog Backends (CPDB) project. In versions 1.0 through 2.0b4, cpdb-libs is vulnerable to buffer overflows via improper use of `scanf(3)`. cpdb-libs uses the `fscanf()` and `scanf()` fu…

  • Critical 9.8

    Buffer overflow in the Address Book of Mobile Device function of Office / Small Office Multifunction Printers and Laser…

  • Critical 9.8

    Buffer overflow in IPP number-up attribute process of Office / Small Office Multifunction Printers and Laser Printers(*…

  • Critical 9.8

    Buffer overflow in IPP sides attribute process of Office / Small Office Multifunction Printers and Laser Printers(*) wh…

  • Critical 9.8

    Buffer overflow in mDNS NSEC record registering process of Office / Small Office Multifunction Printers and Laser Print…

  • Critical 9.8

    This vulnerability allows remote attackers to execute arbitrary code on affected installations of Kepware KEPServerEX 6…

  • Critical 9.8

    This vulnerability allows remote attackers to execute arbitrary code on affected installations of Netatalk. Authenticat…

  • Critical 9.8

    This vulnerability allows remote attackers to execute arbitrary code on affected installations of Netatalk. Authenticat…

  • Critical 9.8

    This vulnerability allows remote attackers to execute arbitrary code on affected installations of Netatalk. Authenticat…

  • Critical 9.8
    CVE-2023-20079 EPSS 10%

    Cisco IP Phone 6800, 7800, 7900, and 8800 Series Web UI Vulnerabilities

    Multiple vulnerabilities in the web-based management interface of certain Cisco IP Phones could allow an unauthenticated, remote attacker to execute arbitrary code or cause a denial of service (DoS) condition. For more information about these vulnerabilities,…

  • Critical 9.8
    CVE-2023-20078 EPSS 10%

    Cisco IP Phone 6800, 7800, 7900, and 8800 Series Web UI Vulnerabilities

    Multiple vulnerabilities in the web-based management interface of certain Cisco IP Phones could allow an unauthenticated, remote attacker to execute arbitrary code or cause a denial of service (DoS) condition. For more information about these vulnerabilities,…

  • Critical 9.3
    CVE-2021-42756 Public exploit EPSS 35%

    Multiple stack-based buffer overflow vulnerabilities [CWE-121] in the proxy daemon of FortiWeb 5.x all versions, 6.0.7 …

  • Critical 9.8

    D-Link N300 WI-FI Router DIR-605L v2.13B01 was discovered to contain a stack overflow via the curTime parameter at /gof…

  • Critical 9.8

    Stack based buffer overflow in WLAN

    Memory corruption due to stack based buffer overflow in WLAN having invalid WNM frame length.

  • Critical 9.8

    Buffer overflow when changing configuration on Tbase Server

    Insufficient validation of input parameters when changing configuration on Tbase server in B&R APROL versions < R 4.2-07 could result in buffer overflow. This may lead to Denial-of-Service conditions or execution of arbitrary code.

  • Critical 9.8

    Advantech R-SeeNet Versions 2.4.17 and prior are vulnerable to a stack-based buffer overflow. An unauthorized attacker …

  • Critical 9.8

    Advantech R-SeeNet Versions 2.4.17 and prior are vulnerable to a stack-based buffer overflow. An unauthorized attacker …

  • Critical 10.0

    A stack-based buffer overflow vulnerability exists in the XCMD setIPCam functionality of Abode Systems, Inc. iota All-I…

  • Critical 10.0

    spx_restservice SubNet_handler_func Multiple Command Injections and Stack-Based Buffer Overflows

    Multiple command injections and stack-based buffer overflows vulnerabilities in the SubNet_handler_func function of spx_restservice allow an attacker to execute arbitrary code with the same privileges as the server user (root). This issue affects: Lanner Inc …

  • Critical 10.0

    spx_restservice Login_handler_func Command Injection and Multiple Stack-Based Buffer Overflows

    Command injection and multiple stack-based buffer overflows vulnerabilities in the Login_handler_func function of spx_restservice allow an attacker to execute arbitrary code with the same privileges as the server user (root). This issue affects: Lanner Inc IA…

  • Critical 9.1

    spx_restservice modifyUserb_func Command Injection and Multiple Stack-Based Buffer Overflows

    Command injection and multiple stack-based buffer overflows vulnerabilities in the modifyUserb_func function of spx_restservice allow an authenticated attacker to execute arbitrary code with the same privileges as the server user (root). This issue affects: L…

  • Critical 10.0

    spx_restservice KillDupUsr_func Command Injection and Stack-Based Buffer Overflow

    Command injection and stack-based buffer overflow vulnerabilities in the KillDupUsr_func function of spx_restservice allow an attacker to execute arbitrary code with the same privileges as the server user (root). This issue affects: Lanner Inc IAC-AST2500A st…

  • Critical 10.0

    spx_restservice Login_handler_func Subfunction Stack-Based Buffer Overflow

    A stack-based buffer overflow vulnerability in a subfunction of the Login_handler_func function of spx_restservice allows an attacker to execute arbitrary code with the same privileges as the server user (root). This issue affects: Lanner Inc IAC-AST2500A sta…

  • Critical 9.8
    CVE-2022-35710 EPSS 43%

    Adobe ColdFusion ODBC Server Stack-based Buffer Overflow Remote Code Execution Vulnerability

    Adobe ColdFusion versions Update 14 (and earlier) and Update 4 (and earlier) are affected by a Stack-based Buffer Overflow vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue does not requ…

  • Critical 9.8
    CVE-2022-35690 EPSS 73%

    Adobe ColdFusion ODBC Agent Stack-based Buffer Overflow Remote Code Execution Vulnerability

    Adobe ColdFusion versions Update 14 (and earlier) and Update 4 (and earlier) are affected by a Stack-based Buffer Overflow vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue does not requ…

  • Critical 10.0

    MZ Automation libIEC61850 Stack-Based Buffer Overflow

    MZ Automation's libIEC61850 (versions 1.4 and prior; version 1.5 prior to commit a3b04b7bc4872a5a39e5de3fdc5fbde52c09e10e) does not sanitize input before memcpy is used, which could allow an attacker to crash the device or remotely execute arbitrary code.

  • Critical 10.0

    MZ Automation libIEC61850 Stack-Based Buffer Overflow

    MZ Automation's libIEC61850 (versions 1.4 and prior; version 1.5 prior to commit a3b04b7bc4872a5a39e5de3fdc5fbde52c09e10e) is vulnerable to a stack-based buffer overflow, which could allow an attacker to crash the device or remotely execute arbitrary code.

  • Critical 9.8
    CVE-2022-2070 Public exploit

    Grandstream GSD3710 Stack-based Buffer Overflow

    In Grandstream GSD3710 in its 1.0.11.13 version, it's possible to overflow the stack since it doesn't check the param length before using the sscanf instruction. Because of that, an attacker could create a socket and connect with a remote IP:port by opening a…

  • Critical 9.8
    CVE-2022-2025 Public exploit

    Grandstream GSD3710 Stack-based Buffer Overflow

    an attacker with knowledge of user/pass of Grandstream GSD3710 in its 1.0.11.13 version, could overflow the stack since it doesn't check the param length before use the strcopy instruction. The explotation of this vulnerability may lead an attacker to execute…

  • Critical 9.9

    Stack-Based Buffer Overflow Vulnerability in the EZVIZ Motion Detection component

    Stack-based Buffer Overflow vulnerability in the EZVIZ Motion Detection component as used in camera models CS-CV248, CS-C6N-A0-1C2WFR, CS-DB1C-A0-1E2W2FR, CS-C6N-B0-1G2WF, CS-C3W-A0-3H4WFRL allows a remote attacker to execute remote code on the device. This i…

  • Critical 9.0

    A stack-based buffer overflow vulnerability exists in the BlynkConsole.h runCommand functionality of Blynk -Library v1.…

  • Critical 9.8

    Cisco Small Business RV110W, RV130, RV130W, and RV215W Routers Remote Command Execution and Denial of Service Vulnerability

    A vulnerability in the web-based management interface of Cisco Small Business RV110W, RV130, RV130W, and RV215W Routers could allow an unauthenticated, remote attacker to execute arbitrary code or cause an affected device to restart unexpectedly, resulting in…

  • Critical 9.4
    CVE-2021-32941 EPSS 15%

    Annke Network Video Recorder - Stack-based Buffer Overflow

    Annke N48PBB (Network Video Recorder) products of version 3.4.106 build 200422 and prior are vulnerable to a stack-based buffer overflow, which allows an unauthorized remote attacker to execute arbitrary code with the same privileges as the server user (root).