Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

jupyter/jupyter_core
main @ 2e63fd3
5
Fixes
2
CVEs
HIGH
Peak severity
80.0%
Coverage
Highlights
Path Traversal: 2 prior fixes. Scrutinize any change in this area.
jupyter_core/paths.py: most-fixed (5 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Arbitrary Code Execution: Jupyter Core historically included the current working directory (CWD) in its search paths for configuration files. If a user ran Jupyter from an untrusted workspace containing malicious configurations, arbitrary code execution could be triggered. This behavior was addressed by removing the CWD from the default configuration search paths.
Path Traversal: The `is_hidden` utility is designed to identify hidden files and directories, but improper normalization allowed attackers to bypass these checks using directory traversal sequences. Attackers could reference sensitive files outside of the intended root directory by supplying uncanonicalized paths.
Insecure Permissions: Searching system-wide, globally-writable folders like %PROGRAMDATA% on Windows for configuration files allowed unprivileged local users to place malicious configuration payloads that affected other users on the same machine. Current versions restrict this search path unless explicitly opted-in.