You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tooling.apache.org by "andrewmusselman (via GitHub)" <gi...@apache.org> on 2026/02/25 18:58:37 UTC
[I] Upload file path validation bypass when file_name parameter is provided (tooling-trusted-releases)
andrewmusselman opened a new issue, #780:
URL: https://github.com/apache/tooling-trusted-releases/issues/780
**Source:** ASVS 2.2.2 Finding 12
**CWE:** CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)
**Location:** `atr/storage/writers/release.py`, lines 295–310
#### Description
The `upload_files` method has different code paths for filename validation. When the `file_name` parameter is provided, it bypasses `form.to_relpath()` validation:
```python
if not file_name:
validated_path = form.to_relpath(file.filename) # Validated
else:
relative_file_path = file_name # NOT validated
```
#### Recommendation
- Always validate the path through `form.to_relpath()` regardless of source.
- We should add a SafeFilename string type
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org
Re: [I] Upload file path validation bypass when file_name parameter is provided (tooling-trusted-releases)
Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp closed issue #780: Upload file path validation bypass when file_name parameter is provided
URL: https://github.com/apache/tooling-trusted-releases/issues/780
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org
Re: [I] Upload file path validation bypass when file_name parameter is provided (tooling-trusted-releases)
Posted by "dave2wave (via GitHub)" <gi...@apache.org>.
dave2wave commented on issue #780:
URL: https://github.com/apache/tooling-trusted-releases/issues/780#issuecomment-4020033376
I did a speculative fix, but I think that the proper action is to remove the file_name field from the form as it doesn't seem to have any impact.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org
Re: [I] Upload file path validation bypass when file_name parameter is provided (tooling-trusted-releases)
Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp commented on issue #780:
URL: https://github.com/apache/tooling-trusted-releases/issues/780#issuecomment-4041758237
Resolved by aee82146153968c091a90714ef8de2fa2f7232ee.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org