CVE-2023-54345
highFrappe Framework ERPNext 13.4.0 contains a sandbox escape vulnerability in RestrictedPython that allows authenticated users with System Manager role to execute…
Vendor / product: Frappe — erpnext
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.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Affected products
Weakness classification (CWE)
Source: NVD / CISA. “NVD-CWE-Other” and “NVD-CWE-noinfo” mean NVD could not assign a specific weakness.
Mitigation & advisories
No vendor advisory or patch reference tagged by NVD. Check the references below.
References
- http://erpnext.org disclosure@vulncheck.com
- https://frappeframework.com/docs/v13/user/en/desk/scripting/server-script disclosure@vulncheck.com
- https://gist.github.com/lebr0nli/c2fc617390451f0e5a4c31c87d8720b6 disclosure@vulncheck.com
- https://github.com/frappe/frappe/ disclosure@vulncheck.com
- https://github.com/frappe/frappe/blob/v13.4.0/frappe/utils/safe_exec.py#L42 disclosure@vulncheck.com
- https://ur4ndom.dev/posts/2023-07-02-uiuctf-rattler-read/ disclosure@vulncheck.com
- https://www.exploit-db.com/exploits/51580 disclosure@vulncheck.com
- https://www.vulncheck.com/advisories/frappe-framework-erpnext-remote-code-execution disclosure@vulncheck.com
