{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:frappe:erpnext:13.4.0:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "13.4.0"
              },
              {
                "last_affected": "13.4.0"
              }
            ],
            "source": "CPE_STRING"
          },
          "events": [
            {
              "introduced": "d0ba0217e444876be2e93961c26704b7fe904f3a"
            },
            {
              "last_affected": "d0ba0217e444876be2e93961c26704b7fe904f3a"
            }
          ],
          "repo": "https://github.com/frappe/erpnext",
          "type": "GIT"
        },
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "13.4.0"
              },
              {
                "last_affected": "13.4.0"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "fc495aa47cf1d532915997a948d839fb66961aa5"
            },
            {
              "last_affected": "fc495aa47cf1d532915997a948d839fb66961aa5"
            }
          ],
          "repo": "https://github.com/frappe/frappe",
          "type": "GIT"
        }
      ],
      "versions": [
        "13.4.0"
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54345.json"
  },
  "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.",
  "id": "CVE-2023-54345",
  "modified": "2026-08-12T03:51:22.513158480Z",
  "published": "2026-05-05T11:24:49.618Z",
  "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"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Frappe Framework ERPNext 13.4.0 Remote Code Execution"
}