{"id":"CVE-2023-54345","summary":"Frappe Framework ERPNext 13.4.0 Remote Code Execution","details":"Frappe Framework ERPNext 13.4.0 contains a sandbox escape vulnerability in RestrictedPython that allows authenticated users with System Manager role to execute arbitrary code by exploiting frame introspection. Attackers can create a server script via the /app/server-script endpoint and access the gi_frame attribute to traverse the call stack and invoke os.popen to execute system commands.","modified":"2026-08-12T03:51:22.513158480Z","published":"2026-05-05T11:24:49.618Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54345.json","cna_assigner":"VulnCheck","cwe_ids":["CWE-94"]},"references":[{"type":"WEB","url":"http://erpnext.org"},{"type":"WEB","url":"https://gist.github.com/lebr0nli/c2fc617390451f0e5a4c31c87d8720b6"},{"type":"WEB","url":"https://github.com/frappe/frappe/"},{"type":"WEB","url":"https://github.com/frappe/frappe/blob/v13.4.0/frappe/utils/safe_exec.py#L42"},{"type":"ADVISORY","url":"https://frappeframework.com/docs/v13/user/en/desk/scripting/server-script"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54345.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-54345"},{"type":"ADVISORY","url":"https://ur4ndom.dev/posts/2023-07-02-uiuctf-rattler-read/"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/frappe-framework-erpnext-remote-code-execution"},{"type":"EVIDENCE","url":"https://www.exploit-db.com/exploits/51580"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/frappe/erpnext","events":[{"introduced":"d0ba0217e444876be2e93961c26704b7fe904f3a"},{"last_affected":"d0ba0217e444876be2e93961c26704b7fe904f3a"}],"database_specific":{"extracted_events":[{"introduced":"13.4.0"},{"last_affected":"13.4.0"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:frappe:erpnext:13.4.0:*:*:*:*:*:*:*"}},{"type":"GIT","repo":"https://github.com/frappe/frappe","events":[{"introduced":"fc495aa47cf1d532915997a948d839fb66961aa5"},{"last_affected":"fc495aa47cf1d532915997a948d839fb66961aa5"}],"database_specific":{"extracted_events":[{"introduced":"13.4.0"},{"last_affected":"13.4.0"}],"source":"AFFECTED_FIELD"}}],"versions":["13.4.0","v13.4.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54345.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}