# CVE-2021-42521: VTK NULL pointer dereference vulnerability

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.35%, higher than 72% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-08-25T00:00:00.000Z
- Modified: 2026-06-17T04:09:45.497Z
- Also known as: GHSA-xfhg-9pjg-xg7g, PYSEC-2022-255
- Weaknesses: CWE-400, CWE-476
- Assigned by: fedora

## Description

There is a NULL pointer dereference vulnerability in VTK before 9.2.5, and it lies in IO/Infovis/vtkXMLTreeReader.cxx. The vendor didn't check the return value of libxml2 API 'xmlDocGetRootElement', and try to dereference it. It is unsafe as the return value can be NULL and that NULL pointer dereference may crash the application.

(As written by CVE List.)

## Affected

- vtk: VTK - 9.0.0 and before
- vtk (PyPI): before 9.0.1
- vtk vtk: up to 9.0.0

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://gitlab.kitware.com/vtk/vtk/issues/17818> (exploit, issue-tracking, third-party-advisory, web)
- <https://discourse.vtk.org/t/vtk-9-2-5-is-out/10549> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PCTMSAAVP4BW2HTZLDWMGKZ2WEC5OFLK/> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-42521> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/vtk/PYSEC-2022-255.yaml> (web)
- <https://gitlab.kitware.com/vtk/vtk> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PCTMSAAVP4BW2HTZLDWMGKZ2WEC5OFLK> (web)
- <https://github.com/advisories/GHSA-xfhg-9pjg-xg7g> (advisory)

## Sources

- CVE List: [CVE-2021-42521](https://www.cve.org/CVERecord?id=CVE-2021-42521), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-xfhg-9pjg-xg7g](https://github.com/advisories/GHSA-xfhg-9pjg-xg7g), CC-BY-4.0, modified 2024-11-18
- NVD: [CVE-2021-42521](https://nvd.nist.gov/vuln/detail/CVE-2021-42521), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-255](https://osv.dev/vulnerability/PYSEC-2022-255), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-42521 · Whole record: https://cve.day/CVE-2021-42521.json · Rebuilt by cve.day 2026-11-25T22:58:07.788Z
