andrewmusselman opened a new issue, #655:
URL: https://github.com/apache/tooling-trusted-releases/issues/655
**Audit refs:** 8.1.1 CRITICAL-02, 8.2.2 HIGH-006
#### Description
`atr/post/distribution.py:62-82` — the `delete` endpoint:
1. Does **not** call `session.check_access(project)`.
2. Accepts `release_name` from user-controlled form data **without**
validating it matches the URL parameters (`project`, `version`).
A committer with access to Project A could submit a form with
`release_name=unauthorized-project-1.0` and delete a distribution from a
different project.
#### Recommended fix
Use a decorator
```python
async def delete(session, delete_form, project, version):
await session.check_access(project)
expected_release_name = sql.release_name(project, version)
if delete_form.release_name != expected_release_name:
raise base.ASFQuartException("Release name mismatch", errorcode=400)
```
**CWE:** CWE-639 (Authorization Bypass Through User-Controlled Key) |
**CVSS:** 8.8
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]