Frappe Framework ERPNext Sandbox Escape Allows RCE via CVE-2023-54345
The National Vulnerability Database has disclosed CVE-2023-54345, a high-severity sandbox escape vulnerability (CVSS 8.8) affecting Frappe Framework ERPNext version 13.4.0. This flaw resides in the RestrictedPython environment, enabling authenticated users with the System Manager role to execute arbitrary code.
Attackers can leverage this by crafting a server script via the /app/server-script endpoint. The vulnerability allows exploitation of frame introspection, specifically the gi_frame attribute, to traverse the call stack. This ultimately permits the invocation of os.popen for arbitrary system command execution, effectively bypassing the sandbox.
This is a critical issue. While it requires an authenticated user with elevated privileges, the ability to escape the sandbox and achieve RCE means an insider threat or a compromised System Manager account can lead to full system compromise. Defenders need to understand the attacker’s calculus here: if they can get a foothold, even with limited access, they’ll look for privilege escalation. This vulnerability is a direct path to that goal.
What This Means For You
- If your organization uses Frappe Framework ERPNext 13.4.0, you must immediately assess your exposure to CVE-2023-54345. Prioritize patching or implementing compensating controls to prevent authenticated System Managers from exploiting this sandbox escape for arbitrary code execution. Audit user accounts with System Manager roles for any suspicious activity.
Related ATT&CK Techniques
🛡️ Detection Rules
3 rules · 6 SIEM formats3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.
CVE-2023-54345 - Frappe Framework ERPNext Server Script Creation
title: CVE-2023-54345 - Frappe Framework ERPNext Server Script Creation
id: scw-2026-05-05-ai-1
status: experimental
level: critical
description: |
Detects the creation of server scripts via the /api/method/frappe.model.script_editor.save_script endpoint, which is a key step in exploiting CVE-2023-54345. Attackers leverage this endpoint to upload malicious scripts that can lead to arbitrary code execution.
author: SCW Feed Engine (AI-generated)
date: 2026-05-05
references:
- https://shimiscyberworld.com/posts/nvd-CVE-2023-54345/
tags:
- attack.execution
- attack.t1059.001
logsource:
category: webserver
detection:
selection:
cs-uri|contains:
- '/api/method/frappe.model.script_editor.save_script'
cs-method:
- 'POST'
condition: selection
falsepositives:
- Legitimate administrative activity
Source: Shimi's Cyber World · License & reuse
Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| CVE-2023-54345 | RCE | Frappe Framework ERPNext version 13.4.0 |
| CVE-2023-54345 | RCE | Authenticated users with System Manager role |
| CVE-2023-54345 | RCE | Sandbox escape in RestrictedPython via frame introspection |
| CVE-2023-54345 | RCE | Vulnerable endpoint: /app/server-script |
| CVE-2023-54345 | RCE | Exploitation via gi_frame attribute to invoke os.popen |
Source & Attribution
| Source Platform | NVD |
| Channel | National Vulnerability Database |
| Published | May 05, 2026 at 15:16 UTC |
This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.
Believe this infringes your rights? Submit a takedown request.