Skip to main content

CWE-676: Use of Potentially Dangerous Function

BaseDraftExploit Likelihood: High

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.

View on MITRE
Back to CWE Lookup

Technical Details

Structure
Simple

Applicable To

Languages
CC++
Platforms

Frequently Asked Questions

What is CWE-676: Use of Potentially Dangerous Function?+

CWE-676: Use of Potentially Dangerous Function is a Common Weakness Enumeration (CWE) entry maintained by MITRE. 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.

What are the security consequences of Use of Potentially Dangerous Function?+

If exploited, CWE-676 (Use of Potentially Dangerous Function) it can compromise Other, leading to outcomes such as Varies by Context, Quality Degradation and Unexpected State.

How do you prevent or mitigate Use of Potentially Dangerous Function?+

Recommended mitigations for CWE-676 include: 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-7]

How is Use of Potentially Dangerous Function detected?+

CWE-676 can be detected using Automated Static Analysis - Binary or Bytecode, Dynamic Analysis with Manual Results Interpretation, Manual Static Analysis - Source Code, Automated Static Analysis - Source Code and Architecture or Design Review. Combining automated tooling with manual review typically yields the best coverage.

Which programming languages are affected by Use of Potentially Dangerous Function?+

CWE-676 commonly affects C and C++. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Use of Potentially Dangerous Function?+

MITRE documents real CVEs mapped to CWE-676, including CVE-2007-1470, CVE-2009-3849, CVE-2006-2114, CVE-2006-0963 and CVE-2011-0712. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-676 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More