Description
The software uses a function that accepts a format string as an argument, but the format string originates from an external source.
Modes of Introduction:
– Implementation
Likelihood of Exploit: High
Related Weaknesses
CWE-668
CWE-668
CWE-123
CWE-20
Consequences
Confidentiality: Read Memory
Format string problems allow for information disclosure which can severely simplify exploitation of the program.
Integrity, Confidentiality, Availability: Modify Memory, Execute Unauthorized Code or Commands
Format string problems can result in the execution of arbitrary code.
Potential Mitigations
Phase: Requirements
Description:
Choose a language that is not subject to this flaw.
Phase: Implementation
Description:
Ensure that all format string functions are passed a static string which cannot be controlled by the user, and that the proper number of arguments are always sent to that function as well. If at all possible, use functions that do not support the %n operator in format strings. [REF-116] [REF-117]
Phase: Build and Compilation
Description:
Run compilers and linkers with high warning levels, since they may detect incorrect usage.
CVE References
- CVE-2002-1825
- format string in Perl program
- CVE-2001-0717
- format string in bad call to syslog function
- CVE-2002-0573
- format string in bad call to syslog function
- CVE-2002-1788
- format strings in NNTP server responses
- CVE-2006-2480
- Format string vulnerability exploited by triggering errors or warnings, as demonstrated via format string specifiers in a .bmp filename.
- CVE-2007-2027
- Chain: untrusted search path enabling resultant format string by loading malicious internationalization messages
More Stories
The Most Dangerous Vulnerabilities in Apache Tomcat and How to Protect Against Them
Apache Tomcat is an open-source web server and servlet container that is widely used in enterprise environments to run Java...
ZDI-CAN-18333: A Critical Zero-Day Vulnerability in Microsoft Windows
Zero-day vulnerabilities are a serious threat to cybersecurity, as they can be exploited by malicious actors to gain unauthorized access...
CWE-669 – Incorrect Resource Transfer Between Spheres
Description The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere,...
CWE-67 – Improper Handling of Windows Device Names
Description The software constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a...
CWE-670 – Always-Incorrect Control Flow Implementation
Description The code contains a control flow path that does not reflect the algorithm that the path is intended to...
CWE-671 – Lack of Administrator Control over Security
Description The product uses security features in a way that prevents the product's administrator from tailoring security settings to reflect...