---
id: CVE-2019-15903
title: >-
  In libexpat before 2.2.8, crafted XML input could fool the parser into
  changing from DTD parsing to document parsing too early; a consecutive call to
  XML_GetCurrentLineNumber (or XML_GetCurrentColumnNumber) then resulted in a
  heap-based …
summary: >-
  In libexpat before 2.2.8, crafted XML input could fool the parser into
  changing from DTD parsing to document parsing too early; a consecutive call to
  XML_GetCurrentLineNumber (or XML_GetCurrentColumnNumber) then resulted in a
  heap-based …
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-125
  - CWE-776
  - CWE-125
vendor: libexpat_project
product: libexpat
affected:
  - libexpat < 2.2.8
  - 'python >= 2.7.0, < 2.7.17'
  - 'python >= 3.5.0, < 3.5.8'
  - 'python >= 3.6.0, < 3.6.10'
  - 'python >= 3.7.0, < 3.7.5'
patched:
  - libexpat 2.2.8
  - python 3.7.5
published: '2019-09-04'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T07:16:47.100'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2019-15903'
references:
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00080.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00081.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00000.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00002.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00003.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00013.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00016.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00017.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00018.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00019.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00008.html'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html'
    label: cve@mitre.org
  - url: >-
      http://packetstormsecurity.com/files/154503/Slackware-Security-Advisory-expat-Updates.html
    label: cve@mitre.org
  - url: >-
      http://packetstormsecurity.com/files/154927/Slackware-Security-Advisory-python-Updates.html
    label: cve@mitre.org
  - url: >-
      http://packetstormsecurity.com/files/154947/Slackware-Security-Advisory-mozilla-firefox-Updates.html
    label: cve@mitre.org
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/23'
    label: cve@mitre.org
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/26'
    label: cve@mitre.org
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/27'
    label: cve@mitre.org
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/30'
    label: cve@mitre.org
  - url: 'https://access.redhat.com/errata/RHSA-2019:3210'
    label: cve@mitre.org
  - url: 'https://access.redhat.com/errata/RHSA-2019:3237'
    label: cve@mitre.org
  - url: 'https://access.redhat.com/errata/RHSA-2019:3756'
    label: cve@mitre.org
  - url: >-
      https://github.com/libexpat/libexpat/commit/c20b758c332d9a13afbbb276d30db1d183a85d43
    label: cve@mitre.org
  - url: 'https://github.com/libexpat/libexpat/issues/317'
    label: cve@mitre.org
  - url: 'https://github.com/libexpat/libexpat/issues/342'
    label: cve@mitre.org
  - url: 'https://github.com/libexpat/libexpat/pull/318'
    label: cve@mitre.org
  - url: 'https://lists.debian.org/debian-lts-announce/2019/11/msg00006.html'
    label: cve@mitre.org
  - url: 'https://lists.debian.org/debian-lts-announce/2019/11/msg00017.html'
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A4TZKPJFTURRLXIGLB34WVKQ5HGY6JJA/
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BDUTI5TVQWIGGQXPEVI4T2ENHFSBMIBP/
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S26LGXXQ7YF2BP3RGOWELBFKM6BHF6UG/
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Dec/17'
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Dec/21'
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Dec/23'
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Nov/1'
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Nov/24'
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Oct/29'
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Sep/30'
    label: cve@mitre.org
  - url: 'https://seclists.org/bugtraq/2019/Sep/37'
    label: cve@mitre.org
  - url: 'https://security.gentoo.org/glsa/201911-08'
    label: cve@mitre.org
  - url: 'https://security.netapp.com/advisory/ntap-20190926-0004/'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT210785'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT210788'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT210789'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT210790'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT210793'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT210794'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT210795'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/4132-1/'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/4132-2/'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/4165-1/'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/4202-1/'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/4335-1/'
    label: cve@mitre.org
  - url: 'https://www.debian.org/security/2019/dsa-4530'
    label: cve@mitre.org
  - url: 'https://www.debian.org/security/2019/dsa-4549'
    label: cve@mitre.org
  - url: 'https://www.debian.org/security/2019/dsa-4571'
    label: cve@mitre.org
  - url: 'https://www.oracle.com/security-alerts/cpuapr2020.html'
    label: cve@mitre.org
  - url: 'https://www.oracle.com/security-alerts/cpuoct2020.html'
    label: cve@mitre.org
  - url: 'https://www.tenable.com/security/tns-2021-11'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00080.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00081.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00000.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00002.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00003.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00013.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00016.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00017.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00018.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00019.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00008.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      http://packetstormsecurity.com/files/154503/Slackware-Security-Advisory-expat-Updates.html
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      http://packetstormsecurity.com/files/154927/Slackware-Security-Advisory-python-Updates.html
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      http://packetstormsecurity.com/files/154947/Slackware-Security-Advisory-mozilla-firefox-Updates.html
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/23'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/26'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/27'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2019/Dec/30'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2019:3210'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2019:3237'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2019:3756'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://github.com/libexpat/libexpat/commit/c20b758c332d9a13afbbb276d30db1d183a85d43
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/libexpat/libexpat/issues/317'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/libexpat/libexpat/issues/342'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/libexpat/libexpat/pull/318'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2019/11/msg00006.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2019/11/msg00017.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A4TZKPJFTURRLXIGLB34WVKQ5HGY6JJA/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BDUTI5TVQWIGGQXPEVI4T2ENHFSBMIBP/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S26LGXXQ7YF2BP3RGOWELBFKM6BHF6UG/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Dec/17'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Dec/21'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Dec/23'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Nov/1'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Nov/24'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Oct/29'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Sep/30'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://seclists.org/bugtraq/2019/Sep/37'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/201911-08'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20190926-0004/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT210785'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT210788'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT210789'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT210790'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT210793'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT210794'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT210795'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/4132-1/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/4132-2/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/4165-1/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/4202-1/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/4335-1/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.debian.org/security/2019/dsa-4530'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.debian.org/security/2019/dsa-4549'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.debian.org/security/2019/dsa-4571'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.oracle.com/security-alerts/cpuapr2020.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.oracle.com/security-alerts/cpuoct2020.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.tenable.com/security/tns-2021-11'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-398330.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
epss: 0.06643
epssPercentile: 0.93735
ingestedAt: '2026-10-14T07:21:04.818Z'
---

## Overview

In libexpat before 2.2.8, crafted XML input could fool the parser into changing from DTD parsing to document parsing too early; a consecutive call to XML_GetCurrentLineNumber (or XML_GetCurrentColumnNumber) then resulted in a heap-based buffer over-read.

## Affected

- `libexpat < 2.2.8`
- `python >= 2.7.0, < 2.7.17`
- `python >= 3.5.0, < 3.5.8`
- `python >= 3.6.0, < 3.6.10`
- `python >= 3.7.0, < 3.7.5`

## Remediation

Upgrade past the affected range:

- `libexpat 2.2.8`
- `python 3.7.5`
