Skip to content
Heist/ feed
Back to feed
High

astropy vulnerable to RCE in TranformGraph().to_dot_graph function

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-41334
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 04:01 UTC · Revision 1

Source evidence

astropy vulnerable to RCE in TranformGraph().to_dot_graph function

core-osv · Original source

Published 18 Mar 2024, 18:48 UTC

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.

osv:CVE-2023-41334
Complete source record
{
  "id": "ce1bb123da280c52df9bb2d8c92ec55841f7d2906edaf2ee0e5c484e49b975db",
  "url": "https://osv.dev/vulnerability/CVE-2023-41334",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "astropy vulnerable to RCE in TranformGraph().to_dot_graph function",
    "summary": "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.",
    "evidence": "osv:CVE-2023-41334",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2023-41334",
      "aliases": [
        "CVE-2023-41334",
        "GHSA-h2x6-5jx5-46hf",
        "PYSEC-2026-1199"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/astropy/astropy",
              "type": "GIT",
              "events": [
                {
                  "introduced": "202be317c0b4b1a7c8d1f6eb7ef29117b0512908"
                },
                {
                  "fixed": "22057d37b1313f5f5a9b5783df0a091d978dccb5"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "= 5.3.2"
                      },
                      {
                        "last_affected": "= 5.3.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "range": [
                      {
                        "fixed": "22057d37b1313f5f5a9b5783df0a091d978dccb5"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "5.3.2",
            "= 5.3.2",
            "v5.3.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-41334.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.691633453Z",
      "provider": "osv",
      "references": [
        "https://github.com/astropy/astropy/blob/9b97d98802ee4f5350a62b681c35d8687ee81d91/astropy/coordinates/transformations.py#L539",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41334.json",
        "https://github.com/astropy/astropy/security/advisories/GHSA-h2x6-5jx5-46hf",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-41334",
        "https://github.com/astropy/astropy/commit/22057d37b1313f5f5a9b5783df0a091d978dccb5"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-77"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41334.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-41334",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 492369,
  "published_at": "2024-03-18T18:48:14.795+00:00"
}