Skip to content

Update Quill version and enhance HTML escaping for security - #4788

Open
sbakshiakp wants to merge 1 commit into
slab:mainfrom
sbakshiakp:snyk_medium_severity_downstream_Injection
Open

Update Quill version and enhance HTML escaping for security#4788
sbakshiakp wants to merge 1 commit into
slab:mainfrom
sbakshiakp:snyk_medium_severity_downstream_Injection

Conversation

@sbakshiakp

Copy link
Copy Markdown
  • Bump Quill version to 1.3.7-snyk-fix.1 in package.json.
  • Implement HTML escaping functions in html_escape.ts to prevent XSS vulnerabilities.
  • Update Formula, Image, and Video formats to use escape functions for safe HTML output.
  • Modify editor's convertHTML function to ensure safe wrapping of elements.
  • Add tests to verify that HTML export correctly escapes potentially harmful content.

- Bump Quill version to 1.3.7-snyk-fix.1 in package.json.
- Implement HTML escaping functions in html_escape.ts to prevent XSS vulnerabilities.
- Update Formula, Image, and Video formats to use escape functions for safe HTML output.
- Modify editor's convertHTML function to ensure safe wrapping of elements.
- Add tests to verify that HTML export correctly escapes potentially harmful content.
@chrissarnold

Copy link
Copy Markdown

Any idea when this might be approved, merged and made available

@0xLeif

0xLeif commented Jul 23, 2026

Copy link
Copy Markdown

Review (via AI-assisted code review): REQUEST CHANGES

The escaping work itself is largely sound — the new html_escape.ts helpers (escapeAttribute covering & < > " ' plus newlines/tabs, stripDangerousAttributes removing on* handlers and javascript: URLs, marker-based safe wrapper reconstruction) correctly close the CVE-2025-15056 formula/video vectors, the data-language attribute breakout, and the convertHTML outerHTML.split() fragility; Video.html() also re-sanitizes the URL before export, which is better than the raw escape in some sibling PRs. But there are blocking problems:

  1. Bogus version change. packages/quill/package.json version is changed from 2.0.3 to 1.3.7-snyk-fix.1. This looks like a Snyk-bot artifact, would downgrade the published package version, and must be reverted.

  2. Unrequested, risky test-config change. test/unit/vitest.config.ts changes include/typecheck.include from resolve(__dirname, '**/*.spec.ts') to the relative 'test/unit/**/*.spec.ts', which only resolves correctly if vitest is invoked from packages/quill and breaks the config's location independence. Unrelated to the security fix; revert.

  3. Output contract change in Formula.html(). The output changes from <span>...</span> to <span class="ql-formula">...</span>. Adding the class may be desirable, but it changes getSemanticHTML() output for every existing consumer and isn't justified by the security fix — split it out or call it out explicitly.

Other notes:

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.

3 participants