Arbitrary File Write in postman_download module
Description
The postman_download module uses the workspace name field from the Postman API to construct the local directory path without sanitization. If a malicious workspace has a name containing path traversal characters, pathlib resolves the path outside the intended output directory, allowing an attacker to write arbitrary files to the user's system.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1Patches
Vulnerability mechanics
Root cause
"Missing input sanitization on the workspace name field allows path traversal when constructing the output directory path."
Attack vector
An attacker hosts a malicious Postman workspace whose `name` field contains path-traversal sequences (e.g., `../`). When the BBOT `postman_download` module processes this workspace, `pathlib` resolves the traversal outside the intended output directory, allowing the attacker to write arbitrary files (a ZIP archive containing workspace JSON data) to any location the user can write. The attacker must first get the victim to scan the malicious workspace (e.g., by publishing it publicly or tricking the user into importing it). [ref_id=1]
Affected code
The `save_workspace` method in `bbot/modules/postman_download.py` constructs a local directory path by directly concatenating `workspace["name"]` with `self.output_dir` via pathlib, without sanitizing the workspace name for path-traversal characters. The same unsanitized name is also used as a filename inside the ZIP archive.
What the fix does
The patch introduces two defenses. First, `self.helpers.tagify(name)` sanitizes the workspace name before using it as a directory name, stripping or encoding traversal characters. Second, a runtime check verifies that the resolved path is still relative to the intended output directory; if not, the operation is aborted with a warning. The same sanitization is applied to collection names used inside the ZIP file. [patch_id=6466798]
Preconditions
- inputThe victim must run BBOT with the postman_download module enabled and process a workspace whose name contains path-traversal sequences.
- networkThe attacker must control a Postman workspace (e.g., by publishing it publicly or tricking the user into importing it).
Generated on Jun 18, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.