AgenticMail API/storage and outbound relay hardening fixes
漏洞描述
The current upstream main branch at commit 7e0206d was reviewed, and the fix-first patch set was rebased on 2026-05-18. The patches cover: validated and bound inactive-agent hour filtering; storage SQL identifier validation; metadata-backed ownership checks for raw storage SQL; blocking direct storage metadata access through raw SQL; fail-closed outbound worker secret handling; SMTP envelope/header control-character validation before command construction; and TLS certificate verification as the default for MailSender with an explicit opt-out for local development. Validation completed locally with targeted API/Core security tests plus API/Core builds. The security patch branch was not published publicly because te repository's SECURITY.md asks reporters not to open public vulnerability issues. Source Code Location: https://github.com/agenticmail/agenticmail Affected Packages: - npm:@agenticmail/api, affected <= 0.9.31, patched in 0.9.32 - npm:@agenticmail/core, affected <= 0.9.9, patched in 0.9.10 CWEs: - CWE-20: Improper Input Validation - CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') - CWE-284: Improper Access Control - CWE-319: Cleartext Transmission of Sensitive Information - CWE-798: Use of Hard-coded Credentials References: - https://github.com/agenticmail/agenticmail/security/advisories/GHSA-wjjv-3mj2-39hf - https://github.com/agenticmail/agenticmail/commit/1408de543fa3577d8c2d4fdb289c75fe6faafac7 - https://github.com/agenticmail/agenticmail/commit/234b811e426a0743170f3b10bc43419d64330155 - https://github.com/agenticmail/agenticmail/commit/6c70c8254c906f823392d7f5ccee88a5481e7731 - https://github.com/agenticmail/agenticmail/commit/8cb053f2307dd77b7736ffa0d7df04b0ccc3272d - https://github.com/agenticmail/agenticmail/blob/7b9b05d973676e9f3d097c08b8e649f59bfc15d0/CHANGELOG.md?plain=1#L1842 - https://github.com/agenticmail/agenticmail/blob/7b9b05d973676e9f3d097c08b8e649f59bfc15d0/packages/core/src/mail/sender.ts#L33 - https://github.com/advisories/GHSA-wjjv-3mj2-39hf