{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2021-21249","published":"2021-01-15T21:15:13.740000Z","last_modified":"2026-06-17T03:35:07.610000Z","status":"Modified","cvss":{"version":"3.1","score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"nvd@nist.gov","primary":true},"auth":true,"cwes":["CWE-74","CWE-502"],"cpes":[{"criteria":"cpe:2.3:a:onedev_project:onedev:*:*:*:*:*:*:*:*","part":"a","vendor":"onedev_project","product":"onedev","version_end_excluding":"4.0.3"}],"cpes_truncated":false,"vendors":["onedev_project"],"products":["onedev_project/onedev"],"epss":{"score":0.03059,"percentile":0.88349,"date":"2026-11-28","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[],"severity":"high","priority_score":53,"links":{"html_es":"/es/cve/CVE-2021-21249/","html_en":"/en/cve/CVE-2021-21249/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-21249","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-21249"},"untrusted":{"vendor_name":"Onedev Project","product_name":"Onedev","desc_en":"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","affected":[{"untrusted_vendor":"theonedev","untrusted_product":"onedev","versions":[]}],"references":[{"url":"https://github.com/theonedev/onedev/commit/d6fc4212b1ac1e9bbe3ce444e95f9af1e3ab8b66","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/theonedev/onedev/security/advisories/GHSA-7xhq-m2q9-6hpm","tags":["Third Party Advisory"]}]}}