Vulnerabilities in pkg:pypi/potato-annotation
PACKAGEGHSA-q9m2-fhv9-3jcf is a MODERATE (CVSS 5.1) `potato-annotation` has a project-boundary bypass vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Potato annotation libraries in the PyPI ecosystem. The issue involves `potato-annotation` has a project-boundary bypass. Remediation is available by upgrading affected packages to version 2.4.5.
pkg:pypi/potato-annotation
Vulnerability advisories affecting package pkg:pypi/potato-annotation. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-q9m2-fhv9-3jcf | - | MODERATE | `potato-annotation` has a Project-Boundary Bypass |
GHSA-q9m2-fhv9-3jcf at a Glance
Security Impact
CVSS: 5.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix GHSA-q9m2-fhv9-3jcf
To remediate this vulnerability, upgrade all affected Potato annotation dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install potato-annotation>=2.4.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show potato-annotation
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-q9m2-fhv9-3jcf, inspect your installed packages using pip:
pip show potato-annotation
Analyze the terminal output to locate any version of Potato annotation in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.5), your application is affected.
Note: The pip show potato-annotation command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Potato annotation, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-q9m2-fhv9-3jcf Affected Potato annotation Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
potato-annotation
|
PyPI |
≥ 2.0.0
< 2.4.5
|
2.4.5
|
References
Frequently Asked Questions
What is GHSA-q9m2-fhv9-3jcf?
Which Potato annotation versions are affected?
What version fixes GHSA-q9m2-fhv9-3jcf?
Is potato-annotation affected?
What is the CVSS score of GHSA-q9m2-fhv9-3jcf?
What CWE is associated with GHSA-q9m2-fhv9-3jcf?
How can I check PyPI dependencies for GHSA-q9m2-fhv9-3jcf?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q9m2-fhv9-3jcf",
"modified" : "2026-05-08T17:31:07Z",
"published" : "2026-05-08T17:31:07Z",
"aliases" : [ ],
"summary" : "`potato-annotation` has a Project-Boundary Bypass",
"details" : "## Summary\n`validate_path_security` uses string-prefix containment (`startswith`) for boundary checks. This allows paths that are **outside** the intended project directory but share its prefix string (e.g., `/tmp/potato_proj_demo_evil/...` vs `/tmp/potato_proj_demo`) to be accepted.\n\n## Details\n### Affected source location (root cause)\n**File:** `potato/server_utils/config_module.py`\n\n**Snippet (lines 370–373):**\n```python\nreal_path = os.path.realpath(normalized_path)\nreal_base = os.path.realpath(base_dir)\nif not real_path.startswith(real_base):\n raise ConfigSecurityError(...)\n```\n\n**Snippet (lines 384–389):**\n```python\nreal_path = os.path.realpath(normalized_path)\ncheck_dir = project_dir if project_dir else base_dir\nreal_check_dir = os.path.realpath(check_dir)\nif not real_path.startswith(real_check_dir):\n raise ConfigSecurityError(...)\n```\n\n`startswith()` is string-based, so `/tmp/potato_proj_demo_evil/...` passes when checked against `/tmp/potato_proj_demo`.\n\n### Confirmed affected call sites\n**File:** `potato/server_utils/config_module.py`\n\n1) `validate_file_paths` task_dir branch (line 2113)\n```python\nvalidated_task_dir = validate_path_security(task_dir, project_dir)\n```\n\n2) `validate_file_paths` data_files branch (line 2151)\n```python\nvalidated_path = validate_path_security(file_path, base_dir, project_dir)\n```\n\n3) `validate_training_config` training.data_file branch (line 2286)\n```python\nvalidated_path = validate_path_security(data_file, base_dir, project_dir)\n```\n\n## PoC\n```python\nfrom potato.server_utils.config_module import validate_path_security\n\nbase = '/tmp/potato_proj_demo'\nvuln = '/tmp/potato_proj_demo_evil/file.txt'\n\ntry:\n print('inside=', validate_path_security('/tmp/potato_proj_demo/file.txt', base, base))\nexcept Exception as e:\n print('inside_error=', type(e).__name__, e)\n\ntry:\n validate_path_security('/tmp/other_demo/file.txt', base, base)\nexcept Exception as e:\n print('baseline=', type(e).__name__, e)\n\nprint('trigger=', validate_path_security(vuln, base, base))\n```\n\n## Impact\n- Can allow unauthorized sibling-prefix file access outside intended project boundary.\n- Can affect read paths (`data_files`, `training.data_file`, `base_css`, `header_logo`) and output/path placement depending on configuration.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "potato-annotation"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/davidjurgens/potato/security/advisories/GHSA-q9m2-fhv9-3jcf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/davidjurgens/potato"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-08T17:31:07Z",
"nvd_published_at" : null
}
}