Context
Telegram documents retain their supplied media type. The shared artifact content endpoint currently serves bytes inline under the authenticated application origin. The inline-serving behavior predates Telegram, but the new external source broadens the trust boundary to group participants.
Directly opening an HTML or active SVG artifact URL may execute content under the application origin. Existing frame and MIME-sniffing headers do not provide a sandbox for a top-level document. This is a static review finding; no live exploit or actual disclosure was observed.
The owner explicitly requested tracking this separately and proceeding with the current release. No fix is included in this task creation.
Relevant code
- server/src/main/kotlin/com/gromozeka/server/telegram/TelegramInboundPolicy.kt: external attachment MIME metadata.
- server/src/main/kotlin/com/gromozeka/server/GromozekaArtifactRouting.kt: inline content disposition and original content type.
- server/src/main/kotlin/com/gromozeka/server/GromozekaBrowserHttpSecurity.kt: current response headers.
Follow-up
- Define safe inline media types versus download-only active content.
- Evaluate forced attachment disposition, a sandboxed content response, or a separate unprivileged content origin.
- Preserve ordinary image/PDF viewing and on-demand external downloads.
- Verify top-level HTML/SVG navigation cannot gain application-origin privileges, using synthetic local fixtures rather than real group content.
Context
Telegram documents retain their supplied media type. The shared artifact content endpoint currently serves bytes inline under the authenticated application origin. The inline-serving behavior predates Telegram, but the new external source broadens the trust boundary to group participants.
Directly opening an HTML or active SVG artifact URL may execute content under the application origin. Existing frame and MIME-sniffing headers do not provide a sandbox for a top-level document. This is a static review finding; no live exploit or actual disclosure was observed.
The owner explicitly requested tracking this separately and proceeding with the current release. No fix is included in this task creation.
Relevant code
Follow-up