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/17 05:34:34 UTC
[I] User impersonation via email sender bypass in message.py (tooling-trusted-releases)
andrewmusselman opened a new issue, #654:
URL: https://github.com/apache/tooling-trusted-releases/issues/654
**Audit refs:** 8.1.1 CRITICAL-01, 8.3.1 HIGH-03
#### Description
The `send()` function in `atr/tasks/message.py` (lines 40โ57) allows user impersonation. When the `email_sender` argument lacks an `@` character, the code logs a warning but **continues execution** using the raw value as an ASF UID. This allows an attacker to invoke `storage.write("admin")` with an arbitrary identity.
#### Attack vector
1. Task is called with `email_sender="admin"` (no `@` symbol)
2. Code hits the warning branch but proceeds with `sender_asf_uid = "admin"`
3. `storage.write("admin")` executes with the impersonated identity
#### Affected code
```python
# atr/tasks/message.py:40-57
if "@" not in args.email_sender:
log.warning(f"Invalid email sender: {args.email_sender}")
sender_asf_uid = args.email_sender # โ Continues with arbitrary value
```
#### Recommended fix
Reject invalid senders immediately rather than continuing:
```python
if "@" not in args.email_sender or not args.email_sender.endswith("@apache.org"):
raise SendError(f"Invalid email sender: {args.email_sender}")
sender_asf_uid = args.email_sender.split("@")[0]
```
Additionally, `recipient_domain == f"{sender_asf_uid}@apache.org"` on line 44 compares a domain to a full email address and always evaluates to `False` (logic bug โ see 8.2.1 ยง2.12).
**CWE:** CWE-287 (Improper Authentication) | **CVSS:** 9.1
--
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] User impersonation via email sender bypass in message.py (tooling-trusted-releases)
Posted by "alitheg (via GitHub)" <gi...@apache.org>.
alitheg closed issue #654: User impersonation via email sender bypass in message.py
URL: https://github.com/apache/tooling-trusted-releases/issues/654
--
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