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

4,196 results · Feed

  • High 7.5

    INDI indiserver 2.2.4.2 Stack Buffer Overflow via XML Tag Parsing

    INDI (Instrument Neutral Distributed Interface) indiserver through 2.2.4.2, fixed in commit 96bbd7f, contains a stack buffer overflow vulnerability that allows unauthenticated remote attackers to crash the daemon by sending malformed XML with mismatched tags …

  • Critical 10.0

    Wavlink WN531P3/WN535M1 Export Pingortrace CGI export_pingortrace.cgi strcpy stack-based overflow

    A vulnerability was determined in Wavlink WN531P3 and WN535M1 V250922. Affected by this vulnerability is the function strcpy of the file /etc/lighttpd/www/cgi-bin/export_pingortrace.cgi of the component Export Pingortrace CGI. Executing a manipulation of the …

  • Critical 9.8

    Buffer Overflow vulnerability in Tenda W20E V16.01.0.6(2782) allows an attacker to execute arbitrary code. This is an i…

  • Critical 9.9

    Edimax EW-7478APC formWanTcpipSetup stack-based overflow

    A weakness has been identified in Edimax EW-7478APC 1.04. This affects the function formWanTcpipSetup of the file /goform/formWanTcpipSetup. This manipulation of the argument pppUserName causes stack-based buffer overflow. Remote exploitation of the attack is…

  • Medium 6.3

    DefaultFuction Customer-Relationship-Management-In-C-Project Customer Search gets stack-based overflow

    A weakness has been identified in DefaultFuction Customer-Relationship-Management-In-C-Project 2.0. Impacted is the function gets of the component Customer Search Module. This manipulation causes stack-based buffer overflow. The attack may be initiated remote…

  • High 8.8

    TOTOLINK A800R wps.so cstecgi.cgi setWiFiWpsConfig stack-based overflow

    A security flaw has been discovered in TOTOLINK A800R 4.1.2cu.5137_B20200730. Affected is the function setWiFiWpsConfig of the file /cgi-bin/cstecgi.cgi of the component wps.so. The manipulation of the argument pin results in stack-based buffer overflow. The …

  • High 8.8

    TOTOLINK A800R firewall.so cstecgi.cgi setUrlFilterRules stack-based overflow

    A vulnerability was identified in TOTOLINK A800R 4.1.2cu.5137_B20200730. This impacts the function setUrlFilterRules of the file /cgi-bin/cstecgi.cgi of the component firewall.so. The manipulation of the argument url leads to stack-based buffer overflow. The …

  • High 8.8

    TOTOLINK A800R lan.so cstecgi.cgi setStaticDhcpConfig stack-based overflow

    A vulnerability was determined in TOTOLINK A800R 4.1.2cu.5137_B20200730. This affects the function setStaticDhcpConfig of the file /cgi-bin/cstecgi.cgi of the component lan.so. Executing a manipulation of the argument Comment can lead to stack-based buffer ov…

  • High 8.8

    TOTOLINK A800R ipv6.so cstecgi.cgi setRadvdCfg stack-based overflow

    A vulnerability was found in TOTOLINK A800R 4.1.2cu.5137_B20200730. The impacted element is the function setRadvdCfg of the file /cgi-bin/cstecgi.cgi of the component ipv6.so. Performing a manipulation of the argument radvdinterfacename results in stack-based…

  • High 8.8

    Tenda W20E addIpMacBind ipMacBindListStore stack-based overflow

    A weakness has been identified in Tenda W20E 15.11.0.6(1068_1546_841)_CN_TDC. The affected element is the function ipMacBindListStore of the file /goform/addIpMacBind. Executing a manipulation of the argument IPMacBindRule can lead to stack-based buffer overf…

  • High 8.8

    Tenda W20E QoS Rule Deletion delQos formQOSRuleDel stack-based overflow

    A security flaw has been discovered in Tenda W20E 15.11.0.6(1068_1546_841)_CN_TDC. Impacted is the function formQOSRuleDel of the file /goform/delQos of the component QoS Rule Deletion. Performing a manipulation of the argument qosIndex results in stack-based…

  • High 8.8

    Tenda W20E QoS Edit editQos lstAdd stack-based overflow

    A vulnerability was identified in Tenda W20E 15.11.0.6(1068_1546_841)_CN_TDC. This issue affects the function lstAdd of the file /goform/editQos of the component QoS Edit. Such manipulation of the argument qosListConnecttedNum leads to stack-based buffer over…

  • High 8.8

    TOTOLINK A800R firewall.so cstecgi.cgi setParentalRules stack-based overflow

    A flaw has been found in TOTOLINK A800R 4.1.2cu.5137_B20200730. Affected by this vulnerability is the function setParentalRules of the file /cgi-bin/cstecgi.cgi of the component firewall.so. Executing a manipulation of the argument urlKeyword can lead to stac…

  • High 8.8

    TOTOLINK A800R firewall.so cstecgi.cgi setMacQos stack-based overflow

    A vulnerability was detected in TOTOLINK A800R 4.1.2cu.5137_B20200730. Affected is the function setMacQos of the file /cgi-bin/cstecgi.cgi of the component firewall.so. Performing a manipulation of the argument macAddress results in stack-based buffer overflo…

  • High 8.8

    TOTOLINK A800R firewall.so cstecgi.cgi setMacFilterRules stack-based overflow

    A security vulnerability has been detected in TOTOLINK A800R 4.1.2cu.5137_B20200730. This impacts the function setMacFilterRules of the file /cgi-bin/cstecgi.cgi of the component firewall.so. Such manipulation of the argument Comment leads to stack-based buff…

  • High 8.8

    TOTOLINK A800R product.so cstecgi.cgi UploadCustomModule stack-based overflow

    A weakness has been identified in TOTOLINK A800R 4.1.2cu.5137_B20200730. This affects the function UploadCustomModule of the file /cgi-bin/cstecgi.cgi of the component product.so. This manipulation of the argument File causes stack-based buffer overflow. The …

  • High 8.8

    TOTOLINK A800R firewall.so cstecgi.cgi setIpQosRules stack-based overflow

    A security flaw has been discovered in TOTOLINK A800R 4.1.2cu.5137_B20200730. The impacted element is the function setIpQosRules of the file /cgi-bin/cstecgi.cgi of the component firewall.so. The manipulation of the argument Comment results in stack-based buf…

  • High 8.8

    Tenda G0 httpd web management interface module addStaticRoute stack-based overflow

    A weakness has been identified in Tenda G0 up to 20260625. The affected element is the function addStaticRoute of the file /goform/module of the component httpd web management interface. Executing a manipulation of the argument staticRouteNet can lead to stac…

  • High 8.8

    Tenda G0 httpd Web Management module formSetPortMirror stack-based overflow

    A vulnerability was identified in Tenda G0 up to 20260625. This issue affects the function formSetPortMirror of the file /goform/module of the component httpd Web Management Interface. Such manipulation of the argument portMirrorMirroredPorts leads to stack-b…

  • High 8.8

    Tenda AC1206 httpd web management interface WifiGuestSet set_wl_guest_iplist stack-based overflow

    A vulnerability was determined in Tenda AC1206 15.03.06.23_multi_TD01. This vulnerability affects the function set_wl_guest_iplist of the file /goform/WifiGuestSet of the component httpd web management interface. This manipulation of the argument shareSpeed c…

  • High 8.8

    Tenda AC1206 httpd web management interface SetOnlineDevName set_device_name stack-based overflow

    A vulnerability was found in Tenda AC1206 15.03.06.23_multi_TD01. This affects the function set_device_name of the file /goform/SetOnlineDevName of the component httpd web management interface. The manipulation of the argument devName results in stack-based b…

  • High 8.2

    PostgreSQL stack buffer overflow in argument match writes 0x0 and 0x1 to server memory

    Stack buffer overflow in PostgreSQL argument name matching allows an object creator to achieve unknown impacts via OUT parameter count. The attack can write only 0x0 and 0x1 bytes. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.

  • Medium 4.7

    Stack-based Buffer Overflow in Wireshark

    Gammu DCT3 trace file parser crash in 4.6.0 to 4.6.7 allows denial of service

  • High 8.4

    IBM® Db2® is vulnerable to buffer overflow in the IXF IMPORT parser

    IBM Db2 11.5.0 through 11.5.9, and 12.1.0 through 12.1.5 is vulnerable to buffer overflow in the IXF IMPORT parser.

  • High 7.8

    MongoDB BI Connector ODBC driver may write outside an allocated buffer when the setup dialog opens a data source with oversized path settings

    A data source definition containing an over-length file path setting may cause the MongoDB BI Connector ODBC Driver setup dialog to write outside the bounds of an allocated buffer. The issue stems from an incorrect buffer capacity calculation in the dialog's …

  • High 8.8

    IBM Informix Server Vulnerability in SQL Interface Handler Could Allow Remote Code Execution

    IBM Informix oninit sq_sgkprepare RCE via unchecked SQL Interface length field.

  • Medium 5.1

    A Stack-based Buffer Overflow vulnerability [CWE-121] vulnerability in Fortinet FortiOS 7.6.1 through 7.6.6 may allow a…

  • Medium 6.3

    Open5GS Diameter S6a hss-s6a-path.c hss_ogs_diam_s6a_ulr_cb stack-based overflow

    A vulnerability was found in Open5GS up to 2.7.1. This affects the function hss_ogs_diam_s6a_air_cb/hss_ogs_diam_s6a_ulr_cb of the file src/hss/hss-s6a-path.c of the component Diameter S6a Interface. Performing a manipulation of the argument os.len results in…

  • High 7.8

    Microsoft Excel Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code locally.

  • High 7.8

    Microsoft Office Graphics Component Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office allows an unauthorized attacker to execute code locally.

  • High 7.8

    Microsoft Access Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office Access allows an unauthorized attacker to execute code locally.

  • High 7.8

    Microsoft Access Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office Access allows an unauthorized attacker to execute code locally.

  • High 7.8

    Microsoft Office Word Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office Word allows an unauthorized attacker to execute code locally.

  • High 7.8

    Microsoft Office Word Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office Word allows an unauthorized attacker to execute code locally.

  • High 7.8

    Microsoft Office Graphics Component Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office allows an unauthorized attacker to execute code locally.

  • High 8.8

    Remote Desktop Client Remote Code Execution Vulnerability

    Stack-based buffer overflow in Remote Desktop Client allows an unauthorized attacker to execute code over a network.

  • High 7.8

    Windows Installer Elevation of Privilege Vulnerability

    Stack-based buffer overflow in Windows Installer allows an authorized attacker to elevate privileges locally.

  • High 7.8

    Windows Installer Elevation of Privilege Vulnerability

    Stack-based buffer overflow in Windows Installer allows an authorized attacker to elevate privileges locally.

  • High 7.8

    Windows Installer Elevation of Privilege Vulnerability

    Stack-based buffer overflow in Windows Installer allows an authorized attacker to elevate privileges locally.

  • High 7.8

    Microsoft Excel Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code locally.