Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency trix to v2.1.1 [security] #10388

Merged
merged 1 commit into from
May 22, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 7, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
trix (source) 2.1.0 -> 2.1.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2024-34341

The Trix editor, versions prior to 2.1.1, is vulnerable to arbitrary code execution when copying and pasting content from the web or other documents with markup into the editor. The vulnerability stems from improper sanitization of pasted content, allowing an attacker to embed malicious scripts which are executed within the context of the application.

Vulnerable Versions:

  • 1.x series up to and including 1.3.1
  • 2.x series up to and including 2.1.0

Fixed Versions:

  • v1.3.2
  • v2.1.1

Vector:

  • Bug 1: When copying content manipulated by a script, such as:
document.addEventListener('copy', function(e){
  e.clipboardData.setData('text/html', '<div><noscript><div class="123</noscript>456<img src=1 onerror=alert(1)//"></div></noscript></div>');
  e.preventDefault();
});

and pasting into the Trix editor, the script within the content is executed.

  • Bug 2: Similar execution occurs with content structured as:
document.write(`copy<div data-trix-attachment="{&quot;contentType&quot;:&quot;text/html&quot;,&quot;content&quot;:&quot;&lt;img src=1 onerror=alert(101)&gt;HELLO123&quot;}"></div>me`);

Impact:

An attacker could exploit these vulnerabilities to execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed.

Remediation:

Update Recommendation: Users should upgrade to Trix editor version 2.1.1 or later, which incorporates proper sanitization of input from copied content.

CSP Enhancement: Additionally, enhancing the Content Security Policy (CSP) to disallow inline scripts can significantly mitigate the risk of such vulnerabilities. Set CSP policies such as script-src 'self' to ensure that only scripts hosted on the same origin are executed, and explicitly prohibit inline scripts using script-src-elem.

References:

Credit: These issues were reported by security researchers loknop and pinpie.


Release Notes

basecamp/trix (trix)

v2.1.1

Compare Source

What's Changed

New Contributors

Full Changelog: basecamp/trix@v2.1.0...v2.1.1


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

vercel bot commented May 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
opencollective-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 11:26am
opencollective-styleguide ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 11:26am

@renovate renovate bot changed the title fix(deps): update dependency trix to v2.1.1 [security] fix(deps): update dependency trix to v2.1.1 [security] - autoclosed May 15, 2024
@renovate renovate bot closed this May 15, 2024
@renovate renovate bot deleted the renovate/npm-trix-vulnerability branch May 15, 2024 17:50
@renovate renovate bot changed the title fix(deps): update dependency trix to v2.1.1 [security] - autoclosed fix(deps): update dependency trix to v2.1.1 [security] May 16, 2024
@renovate renovate bot reopened this May 16, 2024
@renovate renovate bot restored the renovate/npm-trix-vulnerability branch May 16, 2024 08:39
@renovate renovate bot force-pushed the renovate/npm-trix-vulnerability branch from 3b7065f to 660c728 Compare May 16, 2024 08:39
@renovate renovate bot force-pushed the renovate/npm-trix-vulnerability branch from 660c728 to 8e8c85f Compare May 22, 2024 11:06
@znarf znarf merged commit a4d3899 into main May 22, 2024
18 checks passed
@znarf znarf deleted the renovate/npm-trix-vulnerability branch May 22, 2024 13:47
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.

None yet

1 participant