Skip to content

Python: Restrict checkpoint unpickler globals and attribute traversal #7432

Description

Restricted checkpoint decoding currently permits non-type globals through auto-allowed module prefixes. The built-in getattr reconstruction path can also traverse attributes beyond the intended type allowlist. Together, these behaviors can expose unintended callables while deserializing a crafted checkpoint.

Expected behavior: restricted decoding accepts only permitted types, explicitly permitted nested types, and narrowly supported enum-member reconstruction. Non-type globals and unrelated attribute traversal should raise an unpickling error.

Addressed by #5923.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

pythonUsage: [Issues, PRs], Target: Python

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions