CVE-2021-25636: Incorrect trust validation of signature with ambiguous KeyInfo children
CVE-2021-25636
Title: Incorrect trust validation of signature with ambiguous KeyInfo children
Announced: February 22, 2022
Fixed in: LibreOffice 7.2.5/7.3.0
Description:
LibreOffice supports digital signatures of ODF documents and macros within documents, presenting visual aids that no alteration of the document occurred since the last signing and that the signature is valid.
An Improper Certificate Validation vulnerability in LibreOffice allowed an attacker to create a digitally signed ODF document, by manipulating the documentsignatures.xml or macrosignatures.xml stream within the document to contain both "X509Data" and "KeyValue" children of the "KeyInfo" tag[1], which when opened caused LibreOffice to verify using the "KeyValue" but to report verification with the unrelated "X509Data" value.
In versions >= 7.2.5 (and >= 7.3.0) certificate validation is configured to only consider X509Data children to limit validation to X509 certificates only.
[1] https://www.w3.org/TR/xmldsig-core1/#sec-KeyInfo
Other sources
LibreOffice supports digital signatures of ODF documents and macros within documents, presenting visual aids that no alteration of the document occurred since the last signing and that the signature is valid. An Improper Certificate Validation vulnerability in LibreOffice allowed an attacker to create a digitally signed ODF document, by manipulating the documentsignatures.xml or macrosignatures.xml stream within the document to contain both "X509Data" and "KeyValue" children of the "KeyInfo" tag, which when opened caused LibreOffice to verify using the "KeyValue" but to report verification with the unrelated "X509Data" value. This issue affects: The Document Foundation LibreOffice 7.2 versions prior to 7.2.5.
— 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.5.2-r0 - Upgrade
Upgrade
redhat/libreofficeto a version that resolves this vulnerability.Fixed in 7.2.5 - Upgrade
Upgrade
redhat/libreofficeto a version that resolves this vulnerability.Fixed in 7.3.0 - Upgrade
Upgrade
LibreOfficeto a version that resolves this vulnerability.Fixed in 7.2.5 - Upgrade
Upgrade
LibreOfficeto a version that resolves this vulnerability.Fixed in 7.3.0
Event History
Frequently Asked Questions
What is CVE-2021-25636?
CVE-2021-25636 is an Improper Certificate Validation vulnerability in LibreOffice that allows an attacker to create a malicious digital signature.
How does CVE-2021-25636 impact LibreOffice?
CVE-2021-25636 allows an attacker to create a fake digital signature that appears valid, misleading users into thinking that the document has not been altered.
Is CVE-2021-25636 affecting all versions of LibreOffice?
No, CVE-2021-25636 affects LibreOffice versions 7.2.0 to 7.2.5.
What is the severity of CVE-2021-25636?
CVE-2021-25636 has a severity rating of 7.5 (high).
How can I fix CVE-2021-25636?
To fix CVE-2021-25636, update LibreOffice to a version higher than 7.2.5.