{"id":"CVE-2021-21249","aliases":["CVE-2021-21249"],"related":[],"kind":"vulnerability","state":"published","title":"Post-Auth Unsafe Yaml deserialization","summary":"OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, there is an issue involving YAML parsing which can lead to post-auth remote code execution. In order to parse and process YAML files, OneDev uses SnakeYaml which by default (when not using `SafeConstructor`) allows the instantiation of arbitrary classes. We can leverage that to run arbitrary code by instantiating classes such as `javax.script.ScriptEngineManager` and using `URLClassLoader` to load the script engine provider, resulting in the instantiation of a user controlled class. For a full example refer to the referenced GHSA. This issue was addressed in 4.0.3 by only allowing certain known classes to be deserialized","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, there is an issue involving YAML parsing which can lead to post-auth remote code execution. In order to parse and process YAML files, OneDev uses SnakeYaml which by default (when not using `SafeConstructor`) allows the instantiation of arbitrary classes. We can leverage that to run arbitrary code by instantiating classes such as `javax.script.ScriptEngineManager` and using `URLClassLoader` to load the script engine provider, resulting in the instantiation of a user controlled class. For a full example refer to the referenced GHSA. This issue was addressed in 4.0.3 by only allowing certain known classes to be deserialized","source":"cvelist"},{"lang":"es","text":"OneDev es una plataforma devops todo en uno.&#xa0;En OneDev versiones anteriores a 4.0.3, Se presenta un problema relacionado con el análisis de YAML que puede conllevar a una ejecución de código remota  posterior a la autenticación.&#xa0;Para analizar y procesar archivos YAML, OneDev usa SnakeYaml que por defecto (cuando no usa \"SafeConstructor\") permite la instanciación de clases arbitrarias.&#xa0;Podemos aprovechar eso para ejecutar código arbitrario creando instancias de clases como \"javax.script.ScriptEngineManager\" y usando \"URLClassLoader\" para cargar el proveedor del motor de script, resultando en la instanciación de una clase controlada por el usuario.&#xa0;Para obtener un ejemplo completo, consulte la GHSA referenciada.&#xa0;Este problema fue abordado en la versión 4.0.3, al permitir que determinadas clases conocidas sean deserializadas","source":"nvd"}],"published":"2021-01-15T20:10:31.000Z","modified":"2026-06-17T03:35:07.610Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","score":9.6,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","score":9.6,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-74","CWE-502"],"affected":[{"ranges":[{"version":"< 4.0.3","status":"affected"}],"vendor":"theonedev","product":"onedev","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.0.3"}],"vendor":"onedev_project","product":"onedev","cpe":"cpe:2.3:a:onedev_project:onedev:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/theonedev/onedev/security/advisories/GHSA-7xhq-m2q9-6hpm","tags":["third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/theonedev/onedev/commit/d6fc4212b1ac1e9bbe3ce444e95f9af1e3ab8b66","tags":["patch","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21249","url":"https://www.cve.org/CVERecord?id=CVE-2021-21249","licence":"CVE Terms of Use","modified":"2024-08-03T18:09:15.155Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21249","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21249","licence":"Public domain","modified":"2026-06-17T03:35:07.610Z"}],"updatedAt":"2026-11-25T22:57:59.494Z","epss":{"score":0.03059,"percentile":0.8795,"date":"2026-12-01T12:00:22.000Z"}}