CWEweakness

CWE-676 Use of Potentially Dangerous Function

High Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Likelihood of exploit
High
Languages
C, C++
CWE version
5.0

Description

The product invokes a potentially dangerous function that could introduce a vulnerability if it is used incorrectly, but the function can also be used safely.

Common consequences

• Other: Varies by Context, Quality Degradation, Unexpected State — If the function is used incorrectly, then it could result in security problems.

Potential mitigations

• [Build and Compilation, Implementation] Identify a list of prohibited API functions and prohibit developers from using these functions, providing safer alternatives. In some cases, automatic code analysis tools or the compiler can be instructed to spot use of prohibited functions, such as the "banned.h" include file from Microsoft's SDL. [REF-554] [REF-1009] [REF-7]

Detection methods

• Automated Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Bytecode Weakness Analysis - including disassembler + source code weakness analysis • Binary Weakness Analysis - including disassembler + source code weakness analysis Cost effective for partial coverage: • Binary / Bytecode Quality Analysis • Binary / Bytecode simple extractor - strings, ELF readers, etc. • Manual Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies • Dynamic Analysis with Manual Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Debugger Cost effective for partial coverage: • Monitored Virtual Environment - run potentially malicious code in sandbox / wrapper / virtual machine, see if it does anything suspicious • Manual Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Manual Source Code Review (not inspections) Cost effective for partial coverage: • Focused Manual Spotcheck - Focused manual analysis of source • Automated Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Source code Weakness Analyzer • Context-configured Source Code Weakness Analyzer Cost effective for partial coverage: • Warning Flags • Source Code Quality Analyzer • Automated Static Analysis: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Origin Analysis • Architecture or Design Review: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Formal Methods / Correct-By-Construction • Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)

Observed examples

• CVE-2007-1470: Library has multiple buffer overflows using sprintf() and strcpy() • CVE-2009-3849: Buffer overflow using strcat() • CVE-2006-2114: Buffer overflow using strcpy() • CVE-2006-0963: Buffer overflow using strcpy() • CVE-2011-0712: Vulnerable use of strcpy() changed to use safer strlcpy() • CVE-2008-5005: Buffer overflow using strcpy()

Related

Observed example · CVE (6)

  • CVE-2011-0712 Multiple buffer overflows in the caiaq Native Instruments USB audio functionality in the Linux kernel before 2.6.38-rc4-next-20110215 might… vulnerability
  • CVE-2009-3849 Multiple stack-based buffer overflows in HP OpenView Network Node Manager (OV NNM) 7.01, 7.51, and 7.53 allow remote attackers to execute… vulnerability
  • CVE-2008-5005 Multiple stack-based buffer overflows in (1) University of Washington IMAP Toolkit 2002 through 2007c, (2) University of Washington Alpine… vulnerability
  • CVE-2007-1470 Multiple buffer overflows in LIBFtp 5.0 allow user-assisted remote attackers to execute arbitrary code via certain long arguments to the… vulnerability
  • CVE-2006-2114 Buffer overflow in SWS web Server 0.1.7 allows remote attackers to execute arbitrary code via a long request. vulnerability
  • CVE-2006-0963 Multiple buffer overflows in STLport 5.0.2 might allow local users to execute arbitrary code via (1) long locale environment variables to a… vulnerability

Child of · CWE (1)

  • CWE-1177 Use of Prohibited Code weakness

Referenced by CVE · weakness (11)

  • CVE-2025-14601 An OS command injection vulnerability in vsDesk allows an authenticated attacker with administrative privileges to execute arbitrary… vulnerability
  • CVE-2026-14501 IBM Db2 Genius Hub 1.1, 1.1.1, 1.1.2 and IBM Agentics 1.0 could allow an attacker to execute arbitrary code or obtain sensitive information… vulnerability
  • CVE-2026-54499 Stanza is a Stanford NLP Python library for tokenization, sentence segmentation, NER, and parsing of many human languages. vulnerability
  • CVE-2026-48696 FastNetMon Community Edition through 1.2.9 has a buffer overflow, a different vulnerability than CVE-2026-48686 and CVE-2026-48689. vulnerability
  • CVE-2025-67604 A use of potentially dangerous function vulnerability in Fortinet FortiAnalyzer 7.6.0 through 7.6.4, FortiAnalyzer 7.4.0 through 7.4.8,… vulnerability
  • CVE-2025-65117 The vulnerability, if exploited, could allow an authenticated miscreant (Process Optimization Designer User) to embed OLE objects into… vulnerability
  • CVE-2024-50307 Use of potentially dangerous function issue exists in Chatwork Desktop Application (Windows) versions prior to 2.9.2. vulnerability
  • CVE-2024-38434 Unitronics Vision PLC – CWE-676: Use of Potentially Dangerous Function may allow security feature bypass vulnerability
  • CVE-2024-37387 Use of potentially dangerous function issue exists in Ricoh Streamline NX PC Client. vulnerability
  • CVE-2022-39063 When Open5GS UPF receives a PFCP Session Establishment Request, it stores related values for building the PFCP Session Establishment… vulnerability
  • CVE-2021-27474 Rockwell Automation FactoryTalk AssetCentre v10.00 and earlier does not properly restrict all functions relating to IIS remoting services. vulnerability

Referenced by CWE · child of (1)

  • CWE-785 Use of Path Manipulation Function without Maximum-sized Buffer weakness

Referenced by CWE · has member (1)

Referenced by OWASP · mapped cwe (1)