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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProjectMaven CordinatesSecure by DefaultFix
XMLDecoderJava Standard LibraryNoDon't use XMLDecoder with untrusted user input. It is impossible to secure.
ObjectInputStreamJava Standard LibraryNoLeverage a validating input stream like org.apache.commons.io.serialization.ValidatingObjectInputStream
FastJsoncom.alibaba:fastjsonPartiallyCall com.alibaba.fastjson.parser.ParserConfig#setSafeMode with the argument true
SnakeYAMLorg.yaml:snakeyamlNo. Maintainer response.Instantiate the org.yaml.snakeyaml.Yaml instance explicitly with an instance of org.yaml.snakeyaml.constructor.SafeConstructor as an argument.
FasterXML jackson-databindcom.fasterxml.jackson.core:jackson-databindYes + 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. +
Kryocom.esotericsoftware:kryo and com.esotericsoftware:kryo5com.esotericsoftware:kryo versions including & after 5.0.0 Yes; com.esotericsoftware:kryo5 YesDon't call com.esotericsoftware.kryo(5).Kryo#setRegistrationRequired with the argument false.
+

  • @@ -74,7 +127,7 @@ Alvaro Muñoz & Christian Schneider, RSAConference 2016:
  • SnakeYaml documentation on deserialization: -SnakeYaml deserialization. +SnakeYaml deserialization.
  • Hessian deserialization and related gadget chains: