Versions Compared

Key

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

...

The available encodings are listed in the Supported Encodings document [Encodings 2014]. In the absence of an explicitly specified encoding, conversions use the system default encoding. Compatible encodings must be used when characters are output as an array of bytes then input by another JVM and subsequently converted back to characters.

According to the Java API  API [API 2014] for the String class:

...

Using incompatible encodings when communicating string data between JVMs can result in corrupted data.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

STR04-J

Low

Unlikely

Medium

P2

L3

Automated Detection

Sound automated detection of this vulnerability is not feasible.

ToolVersionCheckerDescription
The Checker Framework

Include Page
The Checker Framework_V
The Checker Framework_V

Tainting CheckerTrust and security errors (see Chapter 8)
SonarQube
Include Page
SonarQube_V
SonarQube_V
S1943Classes and methods that rely on the default system encoding should not be used


Bibliography

...


...

Image Modified Image Modified Image Modified