CVE-2022-3140: Macro URL arbitrary script execution
CVE-2022-3140 - LibreOffice supports Office URI Schemes to enable browser integration of LibreOffice with MS SharePoint server. An additional scheme 'vnd.libreoffice.command' specific to LibreOffice was added.
In the affected versions of LibreOffice links using that scheme could be constructed to call internal macros with arbitrary arguments. Which when clicked on, or activated by document events, could result in arbitrary script execution without warning.
Fixed in: LibreOffice 7.3.6/7.4.1 In versions >= 7.3.6 (and >= 7.4.1) such unwanted command URIs are blocked from execution.
Reference: https://www.libreoffice.org/about-us/security/advisories/CVE-2022-3140
Other sources
LibreOffice supports Office URI Schemes to enable browser integration of LibreOffice with MS SharePoint server. An additional scheme 'vnd.libreoffice.command' specific to LibreOffice was added. In the affected versions of LibreOffice links using that scheme could be constructed to call internal macros with arbitrary arguments. Which when clicked on, or activated by document events, could result in arbitrary script execution without warning. This issue affects: The Document Foundation LibreOffice 7.4 versions prior to 7.4.1; 7.3 versions prior to 7.3.6.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/libreofficeto a version that resolves this vulnerability.Fixed in 7.2.7.2-r0 - Upgrade
Upgrade
alpine/libreofficeto a version that resolves this vulnerability.Fixed in 7.2.7.2-r2 - Upgrade
Upgrade
alpine/libreofficeto a version that resolves this vulnerability.Fixed in 7.3.6.2-r0 - Upgrade
Upgrade
debian/libreofficeto a version that resolves this vulnerability.Fixed in 1:7.4.1~rc2-3 - Upgrade
Upgrade
redhat/LibreOfficeto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
redhat/LibreOfficeto a version that resolves this vulnerability.Fixed in 7.4.1 - Upgrade
Upgrade
debian/libreofficeto a version that resolves this vulnerability.Fixed in 4:7.4.7-1+deb12u14Fixed in 4:7.4.7-1+deb12u13Fixed in 4:25.2.3-2+deb13u6Fixed in 4:25.2.3-2+deb13u9Fixed in 4:26.8.2.2-2 - Upgrade
Upgrade
LibreOffice 7.3to a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
LibreOffice 7.4to a version that resolves this vulnerability.Fixed in 7.4.1
Event History
Frequently Asked Questions
What is CVE-2022-3140?
CVE-2022-3140 is a vulnerability in LibreOffice that allows for the construction of links using the 'vnd.libreoffice.command' scheme to call internal macros.
How does LibreOffice's Office URI Schemes vulnerability affect browser integration with MS SharePoint server?
The vulnerability in LibreOffice's Office URI Schemes allows for browser integration with MS SharePoint server, but specifically enables the construction of malicious links to call internal macros.
What versions of LibreOffice are affected by CVE-2022-3140?
Versions of LibreOffice from 7.3.0 to 7.3.6, as well as version 7.4.0, are affected by CVE-2022-3140.
What can an attacker do with the 'vnd.libreoffice.command' scheme in the LibreOffice vulnerability?
An attacker can use the 'vnd.libreoffice.command' scheme to construct links that call internal macros, potentially executing arbitrary commands on a victim's system.
How can I mitigate the vulnerability in LibreOffice's Office URI Schemes?
To mitigate the vulnerability, update your LibreOffice installation to a version that is not affected by CVE-2022-3140.