Skip to content
Heist/ feed
Back to feed
High

restrictedpython — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-76825

RestrictedPython is a tool that helps define a subset of the Python language for accepting program input in a trusted environment. Prior to 8.4, RestrictedPython could allow a sandbox escape when a custom import policy or globals exposed the standard library string module, the string.Formatter class, a Formatter instance, or a Formatter subclass to restricted code. The string.Formatter methods format, get_field, get_value, and vformat performed attribute and item traversal internally without passing through RestrictedPython's safer_getattr protections. Restricted code could use those live object references to reach function globals, builtins, file access, or code execution primitives, affecting confidentiality, integrity, and availability in the host environment. This issue is fixed in version 8.4.

Products
restrictedpython
Affected versions
3.6.0-0ubuntu4, 4.0~b3-2, 4.0~b3-2ubuntu0.1~esm1, 4.0~b3-2ubuntu1, 4.0~b3-3, 4.0~b3-3ubuntu0.1~esm1, 6.2-1, 6.2-1ubuntu0.24.04.1~esm1, 8.0-1, 8.1-1, 8.4-1
Fixed versions
Not specified
CVEs
CVE-2026-76825
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 03:18 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-76825

core-osv · Original source

Published 16 Sept 2026, 15:17 UTC

RestrictedPython is a tool that helps define a subset of the Python language for accepting program input in a trusted environment. Prior to 8.4, RestrictedPython could allow a sandbox escape when a custom import policy or globals exposed the standard library string module, the string.Formatter class, a Formatter instance, or a Formatter subclass to restricted code. The string.Formatter methods format, get_field, get_value, and vformat performed attribute and item traversal internally without passing through RestrictedPython's safer_getattr protections. Restricted code could use those live object references to reach function globals, builtins, file access, or code execution primitives, affecting confidentiality, integrity, and availability in the host environment. This issue is fixed in version 8.4.

osv:UBUNTU-CVE-2026-76825

restrictedpython

Fixed versions: Not specified

restrictedpython

Fixed versions: Not specified

restrictedpython

Fixed versions: Not specified

restrictedpython

Fixed versions: Not specified

restrictedpython

Fixed versions: Not specified

restrictedpython

Fixed versions: Not specified

restrictedpython

Fixed versions: Not specified

Complete source record
{
  "id": "1326e9db579aa66caa82265e2347a4aeab697f690ecae1a0a43f16b1f8dbd734",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-76825",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-76825",
    "summary": "RestrictedPython is a tool that helps define a subset of the Python language for accepting program input in a trusted environment. Prior to 8.4, RestrictedPython could allow a sandbox escape when a custom import policy or globals exposed the standard library string module, the string.Formatter class, a Formatter instance, or a Formatter subclass to restricted code. The string.Formatter methods format, get_field, get_value, and vformat performed attribute and item traversal internally without passing through RestrictedPython's safer_getattr protections. Restricted code could use those live object references to reach function globals, builtins, file access, or code execution primitives, affecting confidentiality, integrity, and availability in the host environment. This issue is fixed in version 8.4.",
    "evidence": "osv:UBUNTU-CVE-2026-76825",
    "products": [
      {
        "name": {
          "value": "restrictedpython",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.6.0-0ubuntu4",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "restrictedpython",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.6.0-0ubuntu4",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "restrictedpython",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.0~b3-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.0~b3-2ubuntu0.1~esm1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "restrictedpython",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.0~b3-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "4.0~b3-2ubuntu1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "4.0~b3-3",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "4.0~b3-3ubuntu0.1~esm1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "restrictedpython",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.0~b3-3",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "6.2-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "6.2-1ubuntu0.24.04.1~esm1",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "restrictedpython",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "8.1-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "8.4-1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "restrictedpython",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "8.0-1",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "8.1-1",
            "evidence": "/affected/6/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-76825",
      "aliases": [
        "UBUNTU-CVE-2026-76825"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "restrictedpython",
            "purl": "pkg:deb/ubuntu/restrictedpython?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "3.6.0-0ubuntu4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-76825.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-restrictedpython",
                "binary_version": "3.6.0-0ubuntu4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "restrictedpython",
            "purl": "pkg:deb/ubuntu/restrictedpython?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "3.6.0-0ubuntu4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-76825.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-restrictedpython",
                "binary_version": "3.6.0-0ubuntu4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "restrictedpython",
            "purl": "pkg:deb/ubuntu/restrictedpython?arch=source&distro=esm-apps%2Ffocal",
            "ecosystem": "Ubuntu:Pro:20.04:LTS"
          },
          "versions": [
            "4.0~b3-2",
            "4.0~b3-2ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-76825.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-restrictedpython",
                "binary_version": "4.0~b3-2ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "restrictedpython",
            "purl": "pkg:deb/ubuntu/restrictedpython?arch=source&distro=esm-apps%2Fjammy",
            "ecosystem": "Ubuntu:Pro:22.04:LTS"
          },
          "versions": [
            "4.0~b3-2",
            "4.0~b3-2ubuntu1",
            "4.0~b3-3",
            "4.0~b3-3ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-76825.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-restrictedpython",
                "binary_version": "4.0~b3-3ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "restrictedpython",
            "purl": "pkg:deb/ubuntu/restrictedpython?arch=source&distro=esm-apps%2Fnoble",
            "ecosystem": "Ubuntu:Pro:24.04:LTS"
          },
          "versions": [
            "4.0~b3-3",
            "6.2-1",
            "6.2-1ubuntu0.24.04.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-76825.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-restrictedpython",
                "binary_version": "6.2-1ubuntu0.24.04.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "restrictedpython",
            "purl": "pkg:deb/ubuntu/restrictedpython?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "8.1-1",
            "8.4-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-76825.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-restrictedpython",
                "binary_version": "8.4-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "restrictedpython",
            "purl": "pkg:deb/ubuntu/restrictedpython?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "8.0-1",
            "8.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-76825.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-restrictedpython",
                "binary_version": "8.1-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T13:01:06.612146543Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-76825"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-76825",
        "https://www.cve.org/CVERecord?id=CVE-2026-76825"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-76825",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 360990,
  "published_at": "2026-09-16T15:17:00+00:00"
}