Add path traversal guard for attachment downloads

fix(confluence): add path traversal guard for attachment downloads (#987)
Add path traversal guard for attachment downloads52b9b0-fix-add-path-traversal-guard-for-attachment-cve-2026-27825fixadd path traversal guard attachment downloads

Committed by sooperset

commit message
fix(confluence): add path traversal guard for attachment downloads (#987)

Add validate_safe_path() utility that resolves symlinks via
Path.resolve() and validates containment with is_relative_to().
Guard Confluence download_attachment() and
download_content_attachments() against path traversal.
Refactor Jira attachment guards to use the shared utility,
strengthening them with symlink resolution.
 
Addresses GHSA-xjgw-4wvw-rgm4.
 
Reported-by: yotampe-pluto
Github-Issue: #984

Editor assessment

This commit patches CVE-2026-27825. The subject names the guard and its target, add path traversal guard for attachment downloads, with a correctly scoped confluence prefix. The body is compact and technical: validate_safe_path resolves symlinks and checks containment with is_relative_to before guarding both download functions, and the Jira guards were refactored onto the same helper so symlink handling improved there too. The advisory, reporter, and issue footers are all well formed. It could state the attack impact more explicitly, but otherwise this is a solid example.

Browse categories

More fix examples · Back to search