xml.parsers.expat and xml.etree.ElementTree use insufficient entropy for Expat hash-flooding protection, which allows a crafted XML document to trigger hash flooding.\r\n\r\nFully mitigating this vulnerability requires both updating libexpat to 2.8.0 or later and applying this patch.
{
"cwe_ids": []
}"https://github.com/psf/advisory-database/blob/main/advisories/python/PSF-2026-23.json"
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"3814617656226460057339031382146484273",
"79948655394174729998410572687005397291",
"269765094616619105105745067465953345178",
"52491913065894657274224157621680217981",
"231686096489310269328649624848028668734",
"9764412166215748283159686165100133222",
"143444819121599425158698232384205236527"
]
},
"target": {
"file": "Include/pyhash.h"
},
"source": "https://github.com/python/cpython/commit/ea70712d1a8508e14e9677d44f838dab04dc0286",
"signature_version": "v1",
"id": "PSF-2026-23-130d6059",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282054346468100250562588928679692945206",
"241745087690371911974619499003941746146"
]
},
"target": {
"file": "Include/pyexpat.h"
},
"source": "https://github.com/python/cpython/commit/eeea765cb9d8f1fc3d8918b272ac3c477983f27a",
"signature_version": "v1",
"id": "PSF-2026-23-13eab482",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "100837677078581469210422368217459004578",
"length": 2990.0
},
"target": {
"function": "_elementtree_XMLParser___init___impl",
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/eeea765cb9d8f1fc3d8918b272ac3c477983f27a",
"signature_version": "v1",
"id": "PSF-2026-23-17d28da6",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"3814617656226460057339031382146484273",
"79948655394174729998410572687005397291",
"269765094616619105105745067465953345178",
"52491913065894657274224157621680217981",
"231686096489310269328649624848028668734",
"9764412166215748283159686165100133222",
"143444819121599425158698232384205236527"
]
},
"target": {
"file": "Include/pyhash.h"
},
"source": "https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b",
"signature_version": "v1",
"id": "PSF-2026-23-2018d730",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"200809790425200767353365779645814661145",
"338571468881071273146244236238519698763",
"158710132041207750309477001233984228072",
"52491913065894657274224157621680217981",
"231686096489310269328649624848028668734",
"9764412166215748283159686165100133222",
"143444819121599425158698232384205236527"
]
},
"target": {
"file": "Include/internal/pycore_pyhash.h"
},
"source": "https://github.com/python/cpython/commit/3573b3b1ecbd99030a0b18658e1bfece771b2566",
"signature_version": "v1",
"id": "PSF-2026-23-2da9aa18",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "100837677078581469210422368217459004578",
"length": 2990.0
},
"target": {
"function": "_elementtree_XMLParser___init___impl",
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/24b8f12544468e4cedf5bfbe25442fcd495391e4",
"signature_version": "v1",
"id": "PSF-2026-23-40d083c4",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"235540386729885170438800261319618750470",
"172128923270737101073236902300203403709",
"307193223577402528095909077030823192072",
"52491913065894657274224157621680217981",
"231686096489310269328649624848028668734",
"9764412166215748283159686165100133222",
"143444819121599425158698232384205236527"
]
},
"target": {
"file": "Include/internal/pycore_pyhash.h"
},
"source": "https://github.com/python/cpython/commit/fc9b11ff49cbc82e6f917d07a61517a2b5f3145f",
"signature_version": "v1",
"id": "PSF-2026-23-426b5dbb",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331466583639241250362361799100269972853",
"268201616245445465644069845275318051766",
"162056430873582821825539244461100327069",
"205189259492710410910413780725664212883"
]
},
"target": {
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/3573b3b1ecbd99030a0b18658e1bfece771b2566",
"signature_version": "v1",
"id": "PSF-2026-23-45eda978",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282054346468100250562588928679692945206",
"241745087690371911974619499003941746146"
]
},
"target": {
"file": "Include/pyexpat.h"
},
"source": "https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b",
"signature_version": "v1",
"id": "PSF-2026-23-54b01c68",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282054346468100250562588928679692945206",
"241745087690371911974619499003941746146"
]
},
"target": {
"file": "Include/pyexpat.h"
},
"source": "https://github.com/python/cpython/commit/3573b3b1ecbd99030a0b18658e1bfece771b2566",
"signature_version": "v1",
"id": "PSF-2026-23-588d9fcd",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "60776478727970771450073440320269809254",
"length": 2876.0
},
"target": {
"function": "_elementtree_XMLParser___init___impl",
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/cbaecf9f16da611a646d507c1cbca265c588fc56",
"signature_version": "v1",
"id": "PSF-2026-23-5cea040d",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "100837677078581469210422368217459004578",
"length": 2990.0
},
"target": {
"function": "_elementtree_XMLParser___init___impl",
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/3573b3b1ecbd99030a0b18658e1bfece771b2566",
"signature_version": "v1",
"id": "PSF-2026-23-5e07327e",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"139223617181001955104759715207834526056",
"228426983551421850305035845652555746849",
"157063243252423991660603289123046198519",
"126873213760035561109826808365762501927",
"156149891684222126871834519137026026373",
"285177093540853341381039225061555051327",
"123367630945934901850591089140463774569",
"203907525583600214249590754539200999315"
]
},
"target": {
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/24b8f12544468e4cedf5bfbe25442fcd495391e4",
"signature_version": "v1",
"id": "PSF-2026-23-6078bfbf",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "100837677078581469210422368217459004578",
"length": 2990.0
},
"target": {
"function": "_elementtree_XMLParser___init___impl",
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b",
"signature_version": "v1",
"id": "PSF-2026-23-612a5525",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282054346468100250562588928679692945206",
"241745087690371911974619499003941746146"
]
},
"target": {
"file": "Include/pyexpat.h"
},
"source": "https://github.com/python/cpython/commit/cbaecf9f16da611a646d507c1cbca265c588fc56",
"signature_version": "v1",
"id": "PSF-2026-23-62753ffb",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"139223617181001955104759715207834526056",
"228426983551421850305035845652555746849",
"157063243252423991660603289123046198519",
"126873213760035561109826808365762501927",
"314965965601410178803286682466095838710",
"249304516044969601131940486954398202197",
"122825007783695525601806510176911638576",
"71504830788034590546234969904776556735"
]
},
"target": {
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/ea70712d1a8508e14e9677d44f838dab04dc0286",
"signature_version": "v1",
"id": "PSF-2026-23-6da1a6bc",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282054346468100250562588928679692945206",
"241745087690371911974619499003941746146"
]
},
"target": {
"file": "Include/pyexpat.h"
},
"source": "https://github.com/python/cpython/commit/24b8f12544468e4cedf5bfbe25442fcd495391e4",
"signature_version": "v1",
"id": "PSF-2026-23-6f2ef549",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282746458073661659926039957721266319977",
"length": 1341.0
},
"target": {
"function": "newxmlparseobject",
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/3573b3b1ecbd99030a0b18658e1bfece771b2566",
"signature_version": "v1",
"id": "PSF-2026-23-6f360086",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "170187021853751598684650737231658061400",
"length": 1356.0
},
"target": {
"function": "newxmlparseobject",
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/cbaecf9f16da611a646d507c1cbca265c588fc56",
"signature_version": "v1",
"id": "PSF-2026-23-6ff3381a",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"139223617181001955104759715207834526056",
"228426983551421850305035845652555746849",
"157063243252423991660603289123046198519",
"126873213760035561109826808365762501927",
"314965965601410178803286682466095838710",
"249304516044969601131940486954398202197",
"122825007783695525601806510176911638576",
"71504830788034590546234969904776556735"
]
},
"target": {
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/cbaecf9f16da611a646d507c1cbca265c588fc56",
"signature_version": "v1",
"id": "PSF-2026-23-73ebef02",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "60776478727970771450073440320269809254",
"length": 2876.0
},
"target": {
"function": "_elementtree_XMLParser___init___impl",
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/ea70712d1a8508e14e9677d44f838dab04dc0286",
"signature_version": "v1",
"id": "PSF-2026-23-74282b5f",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "100837677078581469210422368217459004578",
"length": 2990.0
},
"target": {
"function": "_elementtree_XMLParser___init___impl",
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/fc9b11ff49cbc82e6f917d07a61517a2b5f3145f",
"signature_version": "v1",
"id": "PSF-2026-23-742ecc50",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331466583639241250362361799100269972853",
"268201616245445465644069845275318051766",
"162056430873582821825539244461100327069",
"205189259492710410910413780725664212883"
]
},
"target": {
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/eeea765cb9d8f1fc3d8918b272ac3c477983f27a",
"signature_version": "v1",
"id": "PSF-2026-23-7545dd1a",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331466583639241250362361799100269972853",
"268201616245445465644069845275318051766",
"162056430873582821825539244461100327069",
"205189259492710410910413780725664212883"
]
},
"target": {
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/24b8f12544468e4cedf5bfbe25442fcd495391e4",
"signature_version": "v1",
"id": "PSF-2026-23-7594aa45",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282054346468100250562588928679692945206",
"241745087690371911974619499003941746146"
]
},
"target": {
"file": "Include/pyexpat.h"
},
"source": "https://github.com/python/cpython/commit/ea70712d1a8508e14e9677d44f838dab04dc0286",
"signature_version": "v1",
"id": "PSF-2026-23-774857a5",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282746458073661659926039957721266319977",
"length": 1341.0
},
"target": {
"function": "newxmlparseobject",
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/24b8f12544468e4cedf5bfbe25442fcd495391e4",
"signature_version": "v1",
"id": "PSF-2026-23-7afd403d",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"166105105587415173924359725921319052063",
"296114316441287460608883213281523455880",
"281528802310623845093492893758591649546",
"44432590830127624965365331679815024219"
]
},
"target": {
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/cbaecf9f16da611a646d507c1cbca265c588fc56",
"signature_version": "v1",
"id": "PSF-2026-23-82756c22",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282746458073661659926039957721266319977",
"length": 1341.0
},
"target": {
"function": "newxmlparseobject",
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b",
"signature_version": "v1",
"id": "PSF-2026-23-8afd3046",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"200809790425200767353365779645814661145",
"338571468881071273146244236238519698763",
"158710132041207750309477001233984228072",
"52491913065894657274224157621680217981",
"231686096489310269328649624848028668734",
"9764412166215748283159686165100133222",
"143444819121599425158698232384205236527"
]
},
"target": {
"file": "Include/internal/pycore_pyhash.h"
},
"source": "https://github.com/python/cpython/commit/eeea765cb9d8f1fc3d8918b272ac3c477983f27a",
"signature_version": "v1",
"id": "PSF-2026-23-96e32c16",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282746458073661659926039957721266319977",
"length": 1341.0
},
"target": {
"function": "newxmlparseobject",
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/eeea765cb9d8f1fc3d8918b272ac3c477983f27a",
"signature_version": "v1",
"id": "PSF-2026-23-a310f3cc",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"3814617656226460057339031382146484273",
"79948655394174729998410572687005397291",
"269765094616619105105745067465953345178",
"52491913065894657274224157621680217981",
"231686096489310269328649624848028668734",
"9764412166215748283159686165100133222",
"143444819121599425158698232384205236527"
]
},
"target": {
"file": "Include/pyhash.h"
},
"source": "https://github.com/python/cpython/commit/cbaecf9f16da611a646d507c1cbca265c588fc56",
"signature_version": "v1",
"id": "PSF-2026-23-a544fa38",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331466583639241250362361799100269972853",
"268201616245445465644069845275318051766",
"162056430873582821825539244461100327069",
"205189259492710410910413780725664212883"
]
},
"target": {
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b",
"signature_version": "v1",
"id": "PSF-2026-23-af9ee8a6",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"139223617181001955104759715207834526056",
"228426983551421850305035845652555746849",
"157063243252423991660603289123046198519",
"126873213760035561109826808365762501927",
"156149891684222126871834519137026026373",
"285177093540853341381039225061555051327",
"123367630945934901850591089140463774569",
"203907525583600214249590754539200999315"
]
},
"target": {
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/eeea765cb9d8f1fc3d8918b272ac3c477983f27a",
"signature_version": "v1",
"id": "PSF-2026-23-b03a43ed",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331466583639241250362361799100269972853",
"268201616245445465644069845275318051766",
"162056430873582821825539244461100327069",
"205189259492710410910413780725664212883"
]
},
"target": {
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/fc9b11ff49cbc82e6f917d07a61517a2b5f3145f",
"signature_version": "v1",
"id": "PSF-2026-23-b1b9434c",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"139223617181001955104759715207834526056",
"228426983551421850305035845652555746849",
"157063243252423991660603289123046198519",
"126873213760035561109826808365762501927",
"156149891684222126871834519137026026373",
"285177093540853341381039225061555051327",
"123367630945934901850591089140463774569",
"203907525583600214249590754539200999315"
]
},
"target": {
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/3573b3b1ecbd99030a0b18658e1bfece771b2566",
"signature_version": "v1",
"id": "PSF-2026-23-b72642ca",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"139223617181001955104759715207834526056",
"228426983551421850305035845652555746849",
"157063243252423991660603289123046198519",
"126873213760035561109826808365762501927",
"156149891684222126871834519137026026373",
"285177093540853341381039225061555051327",
"123367630945934901850591089140463774569",
"203907525583600214249590754539200999315"
]
},
"target": {
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b",
"signature_version": "v1",
"id": "PSF-2026-23-d8cffab1",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"139223617181001955104759715207834526056",
"228426983551421850305035845652555746849",
"157063243252423991660603289123046198519",
"126873213760035561109826808365762501927",
"156149891684222126871834519137026026373",
"285177093540853341381039225061555051327",
"123367630945934901850591089140463774569",
"203907525583600214249590754539200999315"
]
},
"target": {
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/fc9b11ff49cbc82e6f917d07a61517a2b5f3145f",
"signature_version": "v1",
"id": "PSF-2026-23-e48a3ebd",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"200809790425200767353365779645814661145",
"338571468881071273146244236238519698763",
"158710132041207750309477001233984228072",
"52491913065894657274224157621680217981",
"231686096489310269328649624848028668734",
"9764412166215748283159686165100133222",
"143444819121599425158698232384205236527"
]
},
"target": {
"file": "Include/internal/pycore_pyhash.h"
},
"source": "https://github.com/python/cpython/commit/24b8f12544468e4cedf5bfbe25442fcd495391e4",
"signature_version": "v1",
"id": "PSF-2026-23-e9ebe48a",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282746458073661659926039957721266319977",
"length": 1341.0
},
"target": {
"function": "newxmlparseobject",
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/fc9b11ff49cbc82e6f917d07a61517a2b5f3145f",
"signature_version": "v1",
"id": "PSF-2026-23-ea80eeb2",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"function_hash": "170187021853751598684650737231658061400",
"length": 1356.0
},
"target": {
"function": "newxmlparseobject",
"file": "Modules/pyexpat.c"
},
"source": "https://github.com/python/cpython/commit/ea70712d1a8508e14e9677d44f838dab04dc0286",
"signature_version": "v1",
"id": "PSF-2026-23-ef77ea68",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282054346468100250562588928679692945206",
"241745087690371911974619499003941746146"
]
},
"target": {
"file": "Include/pyexpat.h"
},
"source": "https://github.com/python/cpython/commit/fc9b11ff49cbc82e6f917d07a61517a2b5f3145f",
"signature_version": "v1",
"id": "PSF-2026-23-f133fdd1",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"166105105587415173924359725921319052063",
"296114316441287460608883213281523455880",
"281528802310623845093492893758591649546",
"44432590830127624965365331679815024219"
]
},
"target": {
"file": "Modules/_elementtree.c"
},
"source": "https://github.com/python/cpython/commit/ea70712d1a8508e14e9677d44f838dab04dc0286",
"signature_version": "v1",
"id": "PSF-2026-23-f3b7c39f",
"deprecated": false
}
]
"2026-08-15T02:10:50Z"