diff --git a/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.qhelp b/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.qhelp index d1933ad4ac2..8d6bd34dab2 100644 --- a/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.qhelp +++ b/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.qhelp @@ -51,6 +51,59 @@ from the input stream removes the vulnerability. +
+ +Fixes by framework +
| Project | +Maven Cordinates | +Secure by Default | +Fix | +
|---|---|---|---|
| XMLDecoder | +Java Standard Library | +No | +Don't use XMLDecoder with untrusted user input. It is impossible to secure. | +
| ObjectInputStream | +Java Standard Library | +No | +Leverage a validating input stream like org.apache.commons.io.serialization.ValidatingObjectInputStream |
+
| FastJson | +com.alibaba:fastjson | +Partially | +Call com.alibaba.fastjson.parser.ParserConfig#setSafeMode with the argument true |
+
| SnakeYAML | +org.yaml:snakeyaml | +No. Maintainer response. | +Instantiate the org.yaml.snakeyaml.Yaml instance explicitly with an instance of org.yaml.snakeyaml.constructor.SafeConstructor as an argument. |
+
| FasterXML jackson-databind | +com.fasterxml.jackson.core:jackson-databind | +Yes | +
+ Don't call com.fasterxml.jackson.databind.ObjectMapper#enableDefaultTyping and don't annotate any object fields with com.fasterxml.jackson.annotation.JsonTypeInfo passing either the CLASS or MINIMAL_CLASS values to the annotation.
+ Read this guide.
+ |
+
| Kryo | +com.esotericsoftware:kryo and com.esotericsoftware:kryo5 | +com.esotericsoftware:kryo versions including & after 5.0.0 Yes; com.esotericsoftware:kryo5 Yes | +Don't call com.esotericsoftware.kryo(5).Kryo#setRegistrationRequired with the argument false. |
+