Repository navigation
Commit a82e060
fix: enforce disableFileAccess/disableUrlAccess for raw message option
MailComposer.compile() built the root MimeNode for a message-level `raw`
option with only { newline }, omitting the disableFileAccess /
disableUrlAccess flags that every other content-node builder threads.
As a result `raw: { path: '/etc/passwd' }` or
`raw: { href: 'http://169.254.169.254/...' }` was read/fetched even when
an application set those flags to sandbox untrusted input, and the file
or HTTP-response bytes became the delivered RFC822 message for all
transports — arbitrary local-file disclosure and full-response SSRF.
Thread both flags onto the raw root node so _getStream() enforces them
consistently with attachments, alternatives, html/text and icalEvent.
Add regression tests asserting raw:{path}/raw:{href} reject with
EFILEACCESS/EURLACCESS when the flags are set.
Refs GHSA-p6gq-j5cr-w38f
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent 4e58450 commit a82e060
2 files changed
Lines changed: 55 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1137 | 1187 | | |
1138 | 1188 | | |
1139 | 1189 | | |
| |||
0 commit comments