Vulnerabilities in pkg:pypi/typed-ast

PACKAGE
Advisory Identifier: GHSA-7xxv-wpxj-mx5v
Advisory Summary

CVE-2019-19275 is a HIGH (CVSS 7.5) typed-ast out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Typed ast libraries in the PyPI ecosystem. The issue involves typed-ast out-of-bounds read. Remediation is available by upgrading affected packages to version 1.3.2.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/typed-ast

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/typed-ast. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7xxv-wpxj-mx5v CVE-2019-19275 HIGH typed-ast Out-of-bounds Read
GHSA-m3jw-62m7-jjcm CVE-2019-19274 HIGH typed-ast Out-of-bounds Read

CVE-2019-19275 at a Glance

CVE Identifier CVE-2019-19275
GHSA Identifier GHSA-7xxv-wpxj-mx5v
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Typed ast
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2019-19275

To remediate this vulnerability, upgrade all affected Typed ast dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

typed-ast fixed: 1.3.2
pip install typed-ast>=1.3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show typed-ast

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-19275, inspect your installed packages using pip:

pip show typed-ast

Analyze the terminal output to locate any version of Typed ast in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.2), your application is affected.

Note: The pip show typed-ast command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Typed ast, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

typed_ast 1.3.0 and 1.3.1 has an ast_for_arguments out-of-bounds read. An attacker with the ability to cause a Python interpreter to parse Python source (but not necessarily execute it) may be able to crash the interpreter process. This could be a concern, for example, in a web-based service that parses (but does not execute) Python code. (This issue also affected certain Python 3.8.0-alpha prereleases.)

CVE-2019-19275 Affected Typed ast Versions

1 component(s)
Fixed Versions:
1.3.2
Product / Package Ecosystem Affected Versions Fixed Version
typed-ast
PyPI
≥ 1.3.0
< 1.3.2
1.3.2

References

Frequently Asked Questions

What is CVE-2019-19275?
CVE-2019-19275 is a security vulnerability in Typed ast involving typed-ast Out-of-bounds Read under CWE-125: Out-of-bounds Read.
Which Typed ast versions are affected?
Affected versions include releases prior to 1.3.2 across affected packages: typed-ast.
What version fixes CVE-2019-19275?
Upgrading to 1.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is typed-ast affected?
Yes, typed-ast is affected in releases prior to 1.3.2. Upgrade your dependency to 1.3.2 or later.
What is the CVSS score of CVE-2019-19275?
CVE-2019-19275 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2019-19275?
CVE-2019-19275 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check PyPI dependencies for CVE-2019-19275?
Run the dependency tree command: 'pip show typed-ast'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7xxv-wpxj-mx5v",
  "modified" : "2024-11-18T22:15:43Z",
  "published" : "2019-12-02T18:03:09Z",
  "aliases" : [ "CVE-2019-19275" ],
  "summary" : "typed-ast Out-of-bounds Read",
  "details" : "typed_ast 1.3.0 and 1.3.1 has an ast_for_arguments out-of-bounds read. An attacker with the ability to cause a Python interpreter to parse Python source (but not necessarily execute it) may be able to crash the interpreter process. This could be a concern, for example, in a web-based service that parses (but does not execute) Python code. (This issue also affected certain Python 3.8.0-alpha prereleases.)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "typed-ast"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.3.1"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-19275"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python/cpython/commit/a4d78362397fc3bced6ea80fbc7b5f4827aec55e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python/cpython/commit/dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python/typed_ast/commit/156afcb26c198e162504a57caddfe0acd9ed7dce"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python/typed_ast/commit/dc317ac9cff859aa84eeabe03fb5004982545b3b"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.python.org/issue36495"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-7xxv-wpxj-mx5v"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/typed-ast/PYSEC-2019-131.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/python/typed_ast"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LG5H4Q6LFVRX7SFXLBEJMNQFI4T5SCEA"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-11-27T02:25:57Z",
    "nvd_published_at" : null
  }
}