Skip to content

[#31] parser_sandbox retains PYTHONPATH/HOME (sandbox escape vector) #1804

Description

@utksh1

parser_sandbox.py:109 _sanitised_env keeps PATH, PYTHONPATH, HOME, TMPDIR, etc. An inherited PYTHONPATH pointing at an attacker-controlled directory lets the 'sandboxed' parser import arbitrary modules. No privilege drop.

Fix: drop PYTHONPATH (or reset to a fixed safe value) and run the parser child as an unprivileged user.

Activity

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

Metadata

Metadata

Labels

area:backendBackend API, database, or service worklevel:advanced55 pts difficulty label for advanced contributor PRspriority:highHigh-priority issuetype:bugBug fix work category bonus labeltype:securitySecurity work category bonus label

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions