[Bug] Upgrade dompurify to 3.5.x

Open Beginner friendly
#5,626 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
security

Research direction

Find where the project declares and locks its dompurify dependency, then check the package manager and update conventions. Upgrade it to version 3.5.x and verify the resolved version meets the reported security fixes; the issue names no tests or specific dependency files.

Written by the indexing model from the issue text.

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

No response

Monaco Editor Playground Code

Reproduction Steps

No response

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

There are two security issues with 3.4.17, the version being included today:

┌───────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Issue         │ DOMPurify: SAFE_FOR_TEMPLATES bypass: template expressions reassemble when sanitized output is reparsed (nested <form> and orphaned end tags) │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Severity      │ moderate                                                                                                                                      │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Dependency    │ dompurify                                                                                                                                     │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Version       │ 3.4.17                                                                                                                                        │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Vulnerable in │ <3.4.18                                                                                                                                       │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.4.18                                                                                                                                      │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-qm7q-q8h9-jg8q                                                                                             │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘


┌───────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Issue         │ DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is reparsed │
├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Severity      │ high                                                                                                                        │
├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Dependency    │ dompurify                                                                                                                   │
├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Version       │ 3.4.17                                                                                                                      │
├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Vulnerable in │ <3.5.0                                                                                                                      │
├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.5.0                                                                                                                     │
├───────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-hrxw-jjj6-2g2j                                                                           │
└───────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Dominant language
JavaScript
Stars
47k
Forks
4.2k
Avg merge
3d 13h
Merged PRs (30d)
13

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/monaco-editor

All issues in microsoft/monaco-editor

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.