Skip to content

🐛 Fix stored XSS via javascript: URI in bubble links (GHSA-hqmv-v56g-4m47)#2435

Merged
baptisteArno merged 6 commits intomainfrom
baptisteArno/fix-ghsa-hqmv-v56g-4m47
Apr 7, 2026
Merged

🐛 Fix stored XSS via javascript: URI in bubble links (GHSA-hqmv-v56g-4m47)#2435
baptisteArno merged 6 commits intomainfrom
baptisteArno/fix-ghsa-hqmv-v56g-4m47

Conversation

@baptisteArno
Copy link
Copy Markdown
Owner

Summary

  • Fix stored XSS vulnerability where javascript: URIs in text bubble links, image click links, and toast popup links could execute arbitrary JS in visitors' browsers
  • Add sanitizeUrl utility that allowlists only http:, https:, mailto:, and tel: protocols
  • Add explicit typecheck Nx targets for builder and viewer (Next.js projects don't get one inferred by @nx/js/typescript)
  • Bump @typebot.io/js and @typebot.io/react to 0.10.1

Test plan

  • Create a bot with a text bubble link set to javascript:alert(1) and verify it renders as #
  • Same test with an image click link
  • Verify normal https:// links still work
  • Run bunx nx typecheck builder and bunx nx typecheck viewer

🤖 Generated with Claude Code

baptisteArno and others added 3 commits April 7, 2026 17:16
…4m47)

Sanitize href attributes in PlateBlock, ImageBubble, and Bot toast links
by filtering out dangerous URI schemes (javascript:, data:, vbscript:).
Only http:, https:, mailto:, and tel: protocols are allowed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Next.js projects don't get a typecheck target inferred by the
@nx/js/typescript plugin. Add explicit tsc --noEmit targets so
`bunx nx typecheck builder` and `bunx nx typecheck viewer` work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
builder-v2 Ignored Ignored Preview Apr 7, 2026 3:40pm
landing-page-v2 Ignored Ignored Preview Apr 7, 2026 3:40pm
viewer-v2 Ignored Ignored Apr 7, 2026 3:40pm

Request Review

github-actions[bot]
github-actions bot previously approved these changes Apr 7, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3284e67864

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Workflow polls for a Codex review on every PR. It also re-triggers
on pull_request_review events from the Codex bot to cancel the
polling run and succeed immediately.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions[bot]
github-actions bot previously approved these changes Apr 7, 2026
The react embed package exports types from its dist/ folder, so it
must be built before other projects can typecheck against it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions[bot]
github-actions bot previously approved these changes Apr 7, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@baptisteArno baptisteArno enabled auto-merge (squash) April 7, 2026 15:40
@baptisteArno baptisteArno merged commit 2c3fc72 into main Apr 7, 2026
10 checks passed
@baptisteArno baptisteArno deleted the baptisteArno/fix-ghsa-hqmv-v56g-4m47 branch April 7, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant