Skip to content

Commit 7aa3fd8

Browse files
committed
Remove double spaces from qhelp
1 parent e6f587e commit 7aa3fd8

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.qhelp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<p>
66
Deserializing untrusted data using any deserialization framework that
77
allows the construction of arbitrary serializable objects is easily exploitable
8-
and in many cases allows an attacker to execute arbitrary code. Even before a
8+
and in many cases allows an attacker to execute arbitrary code. Even before a
99
deserialized object is returned to the caller of a deserialization method a lot
1010
of code may have been executed, including static initializers, constructors,
11-
and finalizers. Automatic deserialization of fields means that an attacker may
11+
and finalizers. Automatic deserialization of fields means that an attacker may
1212
craft a nested combination of objects on which the executed initialization code
1313
may have unforeseen effects, such as the execution of arbitrary code.
1414
</p>
1515
<p>
16-
There are many different serialization frameworks. This query currently
16+
There are many different serialization frameworks. This query currently
1717
supports Kryo, XmlDecoder, XStream, SnakeYaml, JYaml, JsonIO, YAMLBeans, HessianBurlap, Castor, Burlap,
1818
Jackson, Jabsorb, Jodd JSON, Flexjson, Gson, JMS, and Java IO serialization through
1919
<code>ObjectInputStream</code>/<code>ObjectOutputStream</code>.
@@ -22,9 +22,9 @@ Jackson, Jabsorb, Jodd JSON, Flexjson, Gson, JMS, and Java IO serialization thro
2222

2323
<recommendation>
2424
<p>
25-
Avoid deserialization of untrusted data if at all possible. If the
25+
Avoid deserialization of untrusted data if at all possible. If the
2626
architecture permits it then use other formats instead of serialized objects,
27-
for example JSON or XML. However, these formats should not be deserialized
27+
for example JSON or XML. However, these formats should not be deserialized
2828
into complex objects because this provides further opportunities for attack.
2929
For example, XML-based deserialization attacks
3030
are possible through libraries such as XStream and XmlDecoder.
@@ -43,7 +43,7 @@ Recommendations specific to particular frameworks supported by this query:
4343
<li><b>Recommendation</b>: Call <code>com.alibaba.fastjson.parser.ParserConfig#setSafeMode</code> with the argument <code>true</code> before deserializing untrusted data.</li>
4444
</ul>
4545
<p></p>
46-
<p><b>FasterXML</b> - <code>com.fasterxml.jackson.core:jackson-databind</code></p>
46+
<p><b>FasterXML</b> - <code>com.fasterxml.jackson.core:jackson-databind</code></p>
4747
<ul>
4848
<li><b>Secure by Default</b>: Yes</li>
4949
<li><b>Recommendation</b>: Don't call <code>com.fasterxml.jackson.databind.ObjectMapper#enableDefaultTyping</code> and don't annotate any object fields with <code>com.fasterxml.jackson.annotation.JsonTypeInfo</code> passing either the <code>CLASS</code> or <code>MINIMAL_CLASS</code> values to the annotation.
@@ -56,16 +56,16 @@ Recommendations specific to particular frameworks supported by this query:
5656
<li><b>Recommendation</b>: Don't call <code>com.esotericsoftware.kryo(5).Kryo#setRegistrationRequired</code> with the argument <code>false</code> on any <code>Kryo</code> instance that may deserialize untrusted data.</li>
5757
</ul>
5858
<p></p>
59-
<p><b>ObjectInputStream</b> - <code>Java Standard Library</code></p>
59+
<p><b>ObjectInputStream</b> - <code>Java Standard Library</code></p>
6060
<ul>
6161
<li><b>Secure by Default</b>: No</li>
62-
<li><b>Recommendation</b>: Use a validating input stream, such as <code>org.apache.commons.io.serialization.ValidatingObjectInputStream</code>.</li>
62+
<li><b>Recommendation</b>: Use a validating input stream, such as <code>org.apache.commons.io.serialization.ValidatingObjectInputStream</code>.</li>
6363
</ul>
6464
<p></p>
6565
<p><b>SnakeYAML</b> - <code>org.yaml:snakeyaml</code></p>
6666
<ul>
6767
<li><b>Secure by Default</b>: As of version 2.0.</li>
68-
<li><b>Recommendation</b>: For versions before 2.0, pass an instance of <code>org.yaml.snakeyaml.constructor.SafeConstructor</code> to <code>org.yaml.snakeyaml.Yaml</code>'s constructor before using it to deserialize untrusted data.</li>
68+
<li><b>Recommendation</b>: For versions before 2.0, pass an instance of <code>org.yaml.snakeyaml.constructor.SafeConstructor</code> to <code>org.yaml.snakeyaml.Yaml</code>'s constructor before using it to deserialize untrusted data.</li>
6969
</ul>
7070
<p></p>
7171
<p><b>XML Decoder</b> - <code>Standard Java Library</code></p>

0 commit comments

Comments
 (0)