You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tooling.apache.org by "sbp (via GitHub)" <gi...@apache.org> on 2026/09/30 19:21:56 UTC

[I] Reject CR/LF in email subjects (tooling-trusted-releases)

sbp opened a new issue, #1664:
URL: https://github.com/apache/tooling-trusted-releases/issues/1664

   File: `atr/mail.py`
   Function: `send()` / `_reject_null_bytes()`
   Lines: ~88-95 (null byte check), ~112-130 (header construction)
   
   The `_reject_null_bytes()` function validates all email fields (`sender`, `to`, `cc`, `bcc`, `subject`, `body`, `in_reply_to`, `message_id`) for null bytes but does not reject CR/LF characters in the `subject` and `body` fields. In contrast, the `_split_address()` function explicitly rejects `\r` and `\n` in all email address fields. This creates an asymmetry: address fields have full injection-character rejection, while content fields have only null-byte rejection.
   
   **Data flow:** `Message.subject` / `Message.body` → `_reject_null_bytes()` (null bytes only) → `msg["Subject"] = msg_data.subject` → `msg.as_string()` → `_send_via_relay()` → SMTP relay
   
   **Attacker capability required:** Authenticated committer (or system process) who can influence email subject/body content through a currently-unvalidated data source.
   
   **Impact on success:** If a future code path introduces unvalidated user input into subject or body, the lack of explicit CRLF rejection at the mail layer could permit SMTP header injection (e.g., injecting `Bcc:`, `Reply-To:` headers).


-- 
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: issues-unsubscribe@tooling.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Reject CR/LF in email subjects (tooling-trusted-releases)

Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp closed issue #1664: Reject CR/LF in email subjects
URL: https://github.com/apache/tooling-trusted-releases/issues/1664


-- 
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: issues-unsubscribe@tooling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Reject CR/LF in email subjects (tooling-trusted-releases)

Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp commented on issue #1664:
URL: https://github.com/apache/tooling-trusted-releases/issues/1664#issuecomment-5918091580

   ASVS triage: Check `subject` for CR/LF only; do not apply this check to `body`.


-- 
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: issues-unsubscribe@tooling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Reject CR/LF in email subjects (tooling-trusted-releases)

Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp commented on issue #1664:
URL: https://github.com/apache/tooling-trusted-releases/issues/1664#issuecomment-6018212647

   `SMTPUTF8` already does this validation. Resolved by 5c49bc049168c0f32d320162c811df9dde852987, which adds comments to that effect.
   


-- 
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: issues-unsubscribe@tooling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org