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

- Severity: High 8.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/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.13%, higher than 67% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-03-18T18:48:14.795Z
- Modified: 2026-07-07T17:57:04.872Z
- Also known as: GHSA-h2x6-5jx5-46hf, PYSEC-2026-1199
- Weaknesses: CWE-74, CWE-77
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- astropy astropy: = 5.3.2; 5.3.2
- astropy_project astropy: 5.3.2
- astropy (PyPI): before 5.3.3

## Every score

- GitHub_M: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/astropy/astropy/security/advisories/GHSA-h2x6-5jx5-46hf> (exploit, vendor-advisory, web)
- <https://github.com/astropy/astropy/commit/22057d37b1313f5f5a9b5783df0a091d978dccb5> (patch, web)
- <https://github.com/astropy/astropy/blob/9b97d98802ee4f5350a62b681c35d8687ee81d91/astropy/coordinates/transformations.py#L539> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-41334> (advisory)
- <https://github.com/astropy/astropy> (package)
- <https://pypi.org/project/astropy> (package)
- <https://github.com/advisories/GHSA-h2x6-5jx5-46hf> (advisory)

## Sources

- CVE List: [CVE-2023-41334](https://www.cve.org/CVERecord?id=CVE-2023-41334), CVE Terms of Use, modified 2024-08-02
- GitHub Advisory Database: [GHSA-h2x6-5jx5-46hf](https://github.com/advisories/GHSA-h2x6-5jx5-46hf), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2023-41334](https://nvd.nist.gov/vuln/detail/CVE-2023-41334), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1199](https://osv.dev/vulnerability/PYSEC-2026-1199), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2023-41334 · Whole record: https://cve.day/CVE-2023-41334.json · Rebuilt by cve.day 2026-11-25T22:58:33.361Z
