Description
PMail 2.9.1 through 2.9.8 contains a stored cross-site scripting vulnerability because the /attachments/{id}/{cid} endpoint returns email attachments verbatim with the sender-supplied Content-Type after cid: references are rewritten into attachment links. Unauthenticated SMTP senders can email a text/html attachment and a page-covering cid link, so a recipient who clicks the message runs script in their webmail session to change passwords, including the administrator's.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Jinnrry | PMail | 2.9.1 ≤2.9.8 | — |
References
- https://vul.yulun.ac.cn/20261027/pmail/
- https://github.com/Jinnrry/PMail/issues/371
- https://github.com/Jinnrry/PMail/blob/d6815e481c72dc142ebfa478456f4a0e6c069097/server/controllers/attachments.go#L13-L30
- https://github.com/Jinnrry/PMail/blob/d6815e481c72dc142ebfa478456f4a0e6c069097/server/services/detail/detail.go#L49-L58
- https://github.com/Jinnrry/PMail/blob/d6815e481c72dc142ebfa478456f4a0e6c069097/server/dto/parsemail/email.go#L335-L351
- https://www.vulncheck.com/advisories/pmail-2.9.1-through-2.9.8-stored-xss-via-inline-html-attachments