Bug 1954225 (CVE-2021-3516) - CVE-2021-3516 libxml2: Use-after-free in xmlEncodeEntitiesInternal() in entities.c
Summary: CVE-2021-3516 libxml2: Use-after-free in xmlEncodeEntitiesInternal() in entit...
Alias: CVE-2021-3516
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1956968 1956969 1954226 1954227 1956975 1956976
Blocks: 1952638 1954249
TreeView+ depends on / blocked
Reported: 2021-04-27 18:45 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-06-29 16:40 UTC (History)
21 users (show)

Fixed In Version: libxml2 2.9.11
Doc Type: If docs needed, set a value
Doc Text:
There's a flaw in libxml2's xmllint. An attacker who is able to submit a crafted file to be processed by xmllint could trigger a use-after-free. The greatest impact of this flaw is to confidentiality, integrity, and availability.
Clone Of:
Last Closed: 2021-06-29 16:40:56 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:2569 0 None None None 2021-06-29 16:27:41 UTC

Description Guilherme de Almeida Suckevicz 2021-04-27 18:45:30 UTC
An use-after-free was found in xmllint when used with --html and --push options when processing crafted files.


Upstream patch:

Comment 1 Guilherme de Almeida Suckevicz 2021-04-27 18:47:45 UTC
Created libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1954227]

Created mingw-libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1954226]

Comment 3 Guilherme de Almeida Suckevicz 2021-04-30 12:36:41 UTC

Name: zodf0055980 (SQLab NCTU Taiwan)

Comment 7 Todd Cullum 2021-05-04 22:06:51 UTC

The only known exploitation path of this flaw is via the xmllint tool.

This flaw is out of support scope for Red Hat Enterprise Linux 6 and 7. To learn more about Red Hat Enterprise Linux support life cycles, please see https://access.redhat.com/support/policy/updates/errata .

Comment 8 Todd Cullum 2021-05-04 22:09:20 UTC
This flaw was caused by xmlCtxtUseOptions() being called on a htmlParserCtxtPtr, rather than htmlCtxtUseOptions().

Comment 9 Todd Cullum 2021-05-04 22:10:16 UTC

This flaw can be mitigated by not using xmllint with the --html and --push options together.

Comment 11 errata-xmlrpc 2021-06-29 16:27:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:2569 https://access.redhat.com/errata/RHSA-2021:2569

Comment 12 Product Security DevOps Team 2021-06-29 16:40:56 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


Note You need to log in before you can comment on or make changes to this bug.