{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-21249","id":"CVE-2021-21249","title":"Post-Auth Unsafe Yaml deserialization","description":"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","descriptionLong":"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","published":"2021-01-15T20:10:31.000Z","updated":"2026-10-20T14:28:03.485680892Z","reserved":"2020-12-22T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","rating":"critical","source":"github.com"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"2.0","score":6.5,"vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","rating":"medium","source":"NVD"}],"rating":"critical","products":["theonedev onedev"],"affectedProducts":[{"vendor":"theonedev","product":"onedev","defaultStatus":null,"versions":[{"status":"affected","version":"< 4.0.3"}],"platforms":[]}],"packages":[],"cwes":["CWE-74","CWE-502"],"aliases":["GHSA-7xhq-m2q9-6hpm"],"references":[{"url":"https://github.com/theonedev/onedev/security/advisories/GHSA-7xhq-m2q9-6hpm","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/theonedev/onedev/commit/d6fc4212b1ac1e9bbe3ce444e95f9af1e3ab8b66","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.03059,"epssPercentile":0.87878,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-21249","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21249","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-21249","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-21249","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}