Junglewise Threat Intelligence

CVE-2021-21320: Matrix React SDK user content sandbox document opening vulnerability

CVE-2021-21320 · Severity: low · CVSS 3.1 · Published 2021-03-03

Technologies: matrix-react-sdk (npm). Vendors: npm, Matrix.org.

Executive brief

Matrix React SDK, a JavaScript library for building Matrix chat clients, contains a sandbox bypass vulnerability that allows attackers to trick users into opening arbitrary documents. If exploited, malicious documents can access sensitive user data including messages and authentication secrets through the client's origin.

Technical details

The vulnerability exists in the user content sandbox implementation of Matrix React SDK versions prior to 3.15.0. The sandbox could be abused to trick users into opening unexpected documents through social engineering (multiple user interactions). The malicious content could be opened with a blob origin from the Matrix client itself, allowing it to escape the sandbox and access user messages and secrets due to origin confusion. The root cause was a redundant or insufficiently restrictive lockOrigin parameter in the usercontent module. The fix, applied in version 3.15.0, removes this redundant parameter to properly restrict access to each Element client instance's own origin only. No active exploitation in the wild has been reported.

Affected products

  • Matrix.org matrix-react-sdk < 3.15.0

Timeline

  • 2021-03-03: disclosed: Security advisory GHSA-52mq-6jcv-j79x published
  • 2021-03-03: patched: Fix included in version 3.15.0

References

Related threats