Summary
Teable has a stored cross-site scripting vulnerability in attachment handling: an authenticated user can upload SVG or HTML content with an attacker-chosen content type. When a victim opens the same-origin attachment read URL, the content may execute script in the victim's browser, potentially allowing actions through the victim's session.
Affected context
The issue affects Teable builds before 2026-10-12T12-45-53Z.3331 where authenticated users can upload SVG or HTML attachments with a chosen content type. Risk arises when the attachment read endpoint serves the content inline from the application's origin without an effective Content Security Policy.
Exploit preconditions
- Attack surface: Attachment upload and same-origin attachment read endpoint
- Required access: An authenticated account able to upload attachments
- Trigger point: A victim opens an attachment read URL supplied by the attacker
- Why exploitation is possible: The uploaded active content is served inline with an attacker-chosen content type and an empty Content-Security-Policy, allowing script to run in the application's origin
Why this happens
The vulnerability is a stored cross-site scripting flaw mapped to CWE-79: Improper Neutralization of Input During Web Page Generation. Uploaded active content is served in a browser-executable context without sufficient content restrictions, allowing attacker-controlled markup or script to be interpreted as trusted application-origin content.
Potential impact
- Script may run in a victim's authenticated browser session
- An attacker could perform API actions available to the victim
- Sensitive information accessible through the application may be exposed
- The application's data or user workflows could be altered
General mitigation guidance
Common defensive patterns include:
- Treat uploaded files as untrusted and avoid serving active formats inline
- Serve attachments from a separate origin that does not share application credentials
- Use safe content-type handling and force downloads where inline rendering is unnecessary
- Apply a restrictive Content Security Policy and other browser security headers
- Validate allowed file types based on content as well as declared metadata
- Limit account privileges and restrict who can upload attachments
How teams detect issues like this
High-level review and monitoring approaches include:
- Review attachment upload and read paths for reliance on user-supplied content types
- Use static analysis and code review to identify inline rendering of untrusted HTML or SVG
- Check that attachment responses have appropriate content-disposition and security headers
- Enforce policies that restrict active file types or require isolated-origin serving
- Monitor for suspicious attachment uploads and access patterns

