Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Interpretation of Java format strings is stricter than that in languages such as C. The standard library implementations throw appropriate exceptions when any conversion argument fails to match the corresponding flag. This approach reduces opportunities for malicious exploits. Nevertheless, malicious user input can exploit format strings and can cause information leaks or denial of service. As a result, strings from an untrusted source shall should not be incorporated into format strings.

...

This compliant solution ensures that user-generated input is excluded from format strings.

...

CERT C Secure Coding Standard

FIO30-C. Exclude user input from format strings

CERT C++ Secure Coding Standard

FIO30-CPP. Exclude user input from format strings

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5534549c6f252b5b-f2816869-45a04c8c-baeeab13-0ee10d9cf2b3be0a2d914551"><ac:plain-text-body><![CDATA[

[ISO/IEC TR 24772:2010

http://www.aitcnet.org/isai/]

"Injection [RST]"

]]></ac:plain-text-body></ac:structured-macro>

MITRE CWE

CWE ID -134, "Uncontrolled Format String"

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="fd2c7113a186589e-4903e492-43e54ea3-9dcbaa47-a7a2440e77ef9bfef89285cb"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

[Class Formatter

http://java.sun.com/javase/6/docs/api/java/util/Formatter.html]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="734bb18a323b9111-66236e73-4e864391-b4c0b8cf-41cb9e9a755b882b4e54ddac"><ac:plain-text-body><![CDATA[

[[Seacord 2005

AA. Bibliography#Seacord 05]]

Chapter 6, Formatted Output

]]></ac:plain-text-body></ac:structured-macro>

...