unicodedata.normalize() can take excessive CPU time when processing specially crafted Unicode input containing long runs of combining characters with alternating Canonical Combining Class values. This affects all normalization forms.
{
"cwe_ids": []
}"https://github.com/psf/advisory-database/blob/main/advisories/python/PSF-2026-25.json"
"2026-06-05T08:03:17Z"
[
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"268023228427852566166778512071357440600",
"49146083870971075955850832180074366424",
"161672440834380912063121567226975060960",
"153085767786823762895735790163658016389",
"135509388062542668278157600424988217870",
"40432734503210116425854705190800869105",
"67917629224510527522426034072535157781",
"166059517570380481219309316964869990163",
"294360439454152527808199495974781540585",
"170330277675488459509468124667336941004",
"184053942208226878460548629848761958422",
"240045722696411144875232246105586979129",
"93710467222427039179910580139128872663",
"209237957012120494894586662202902686465",
"147654122287567650578738412833181847981",
"24990523950584544933005789034442021776",
"1264985441848487617347146654540945009",
"133330517599374281998429843403409091794",
"127443196720502476492358266579536038067",
"3181874749795572638750267391225425145",
"307914191939463532258847797789855238334",
"286412164138618208239887763369097989485",
"307593036341876832873496387178886053544",
"180009021221470715406240491680011005097",
"156465678391889216761798254167431182266",
"82836382254405138165517379031607017540",
"227968830222571029245542858130173244620",
"67182187083228673263224222914878921244",
"57736110775017630481064347297403175377",
"302653350848325407386670540887022255768",
"286226533525041986095987183448852403072",
"80182737293428689637757344597563484626",
"142560442433471134166656314351965641631",
"17745141639070398683318578068814680478",
"218952618749510052119157813261456705701",
"102036494579086370049475867152140605174",
"201649383242728164902186177763329708614",
"284486070469665139152058084000943158718",
"282125080222604138545009578927394278576",
"209263334470273031857898668634517540189",
"97167674396009702908517784832796456039",
"228351455830612818484346341007161794228",
"3845685004980929502917890862926582016",
"90552866213243599336765302395377852569",
"104656373242435013484262366179006480249",
"190308209830565771410520664941609283320",
"223157110990009253730597991692455861773",
"65160796642085047173564505076705510442",
"67461273610231228418032117386320498105",
"99660230946440346439155050003271657315"
]
},
"source": "https://github.com/python/cpython/commit/c5512bd7c1dc28055660565275012766941d3066",
"id": "PSF-2026-25-3eafbb86",
"signature_type": "Line",
"target": {
"file": "Modules/unicodedata.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"268023228427852566166778512071357440600",
"49146083870971075955850832180074366424",
"161672440834380912063121567226975060960",
"153085767786823762895735790163658016389",
"135509388062542668278157600424988217870",
"40432734503210116425854705190800869105",
"67917629224510527522426034072535157781",
"166059517570380481219309316964869990163",
"294360439454152527808199495974781540585",
"170330277675488459509468124667336941004",
"184053942208226878460548629848761958422",
"240045722696411144875232246105586979129",
"93710467222427039179910580139128872663",
"209237957012120494894586662202902686465",
"147654122287567650578738412833181847981",
"24990523950584544933005789034442021776",
"1264985441848487617347146654540945009",
"133330517599374281998429843403409091794",
"127443196720502476492358266579536038067",
"3181874749795572638750267391225425145",
"307914191939463532258847797789855238334",
"286412164138618208239887763369097989485",
"37581859737422359197274500597813990409",
"307593036341876832873496387178886053544",
"180009021221470715406240491680011005097",
"156465678391889216761798254167431182266",
"82836382254405138165517379031607017540",
"227968830222571029245542858130173244620",
"67182187083228673263224222914878921244",
"57736110775017630481064347297403175377",
"302653350848325407386670540887022255768",
"286226533525041986095987183448852403072",
"80182737293428689637757344597563484626",
"142560442433471134166656314351965641631",
"17745141639070398683318578068814680478",
"218952618749510052119157813261456705701",
"102036494579086370049475867152140605174",
"201649383242728164902186177763329708614",
"284486070469665139152058084000943158718",
"282125080222604138545009578927394278576",
"209263334470273031857898668634517540189",
"97167674396009702908517784832796456039",
"228351455830612818484346341007161794228",
"3845685004980929502917890862926582016",
"90552866213243599336765302395377852569",
"104656373242435013484262366179006480249",
"190308209830565771410520664941609283320",
"223157110990009253730597991692455861773",
"65160796642085047173564505076705510442",
"67461273610231228418032117386320498105",
"99660230946440346439155050003271657315"
]
},
"source": "https://github.com/python/cpython/commit/ba785b88add96acbf403d65cb157fb2743a33a32",
"id": "PSF-2026-25-405651fc",
"signature_type": "Line",
"target": {
"file": "Modules/unicodedata.c"
}
},
{
"source": "https://github.com/python/cpython/commit/ba785b88add96acbf403d65cb157fb2743a33a32",
"deprecated": false,
"digest": {
"length": 2340.0,
"function_hash": "162589632402962372351893321289505254809"
},
"signature_version": "v1",
"id": "PSF-2026-25-4a4779ed",
"target": {
"function": "nfd_nfkd",
"file": "Modules/unicodedata.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"length": 2340.0,
"function_hash": "162589632402962372351893321289505254809"
},
"source": "https://github.com/python/cpython/commit/6b505d1f41f8f3ea0fe5a4786d3a8fff1875cfc0",
"id": "PSF-2026-25-52b41288",
"signature_type": "Function",
"target": {
"function": "nfd_nfkd",
"file": "Modules/unicodedata.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"268023228427852566166778512071357440600",
"49146083870971075955850832180074366424",
"161672440834380912063121567226975060960",
"153085767786823762895735790163658016389",
"135509388062542668278157600424988217870",
"40432734503210116425854705190800869105",
"67917629224510527522426034072535157781",
"166059517570380481219309316964869990163",
"294360439454152527808199495974781540585",
"170330277675488459509468124667336941004",
"184053942208226878460548629848761958422",
"240045722696411144875232246105586979129",
"93710467222427039179910580139128872663",
"209237957012120494894586662202902686465",
"147654122287567650578738412833181847981",
"24990523950584544933005789034442021776",
"1264985441848487617347146654540945009",
"133330517599374281998429843403409091794",
"127443196720502476492358266579536038067",
"3181874749795572638750267391225425145",
"307914191939463532258847797789855238334",
"286412164138618208239887763369097989485",
"307593036341876832873496387178886053544",
"180009021221470715406240491680011005097",
"156465678391889216761798254167431182266",
"82836382254405138165517379031607017540",
"227968830222571029245542858130173244620",
"67182187083228673263224222914878921244",
"57736110775017630481064347297403175377",
"302653350848325407386670540887022255768",
"286226533525041986095987183448852403072",
"80182737293428689637757344597563484626",
"142560442433471134166656314351965641631",
"17745141639070398683318578068814680478",
"218952618749510052119157813261456705701",
"102036494579086370049475867152140605174",
"201649383242728164902186177763329708614",
"284486070469665139152058084000943158718",
"282125080222604138545009578927394278576",
"209263334470273031857898668634517540189",
"97167674396009702908517784832796456039",
"228351455830612818484346341007161794228",
"3845685004980929502917890862926582016",
"90552866213243599336765302395377852569",
"104656373242435013484262366179006480249",
"190308209830565771410520664941609283320",
"223157110990009253730597991692455861773",
"65160796642085047173564505076705510442",
"67461273610231228418032117386320498105",
"99660230946440346439155050003271657315"
]
},
"source": "https://github.com/python/cpython/commit/6b505d1f41f8f3ea0fe5a4786d3a8fff1875cfc0",
"id": "PSF-2026-25-cc49dc6a",
"signature_type": "Line",
"target": {
"file": "Modules/unicodedata.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"length": 2340.0,
"function_hash": "162589632402962372351893321289505254809"
},
"source": "https://github.com/python/cpython/commit/c5512bd7c1dc28055660565275012766941d3066",
"id": "PSF-2026-25-d51f7394",
"signature_type": "Function",
"target": {
"file": "Modules/unicodedata.c",
"function": "nfd_nfkd"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"268023228427852566166778512071357440600",
"49146083870971075955850832180074366424",
"161672440834380912063121567226975060960",
"153085767786823762895735790163658016389",
"135509388062542668278157600424988217870",
"40432734503210116425854705190800869105",
"67917629224510527522426034072535157781",
"166059517570380481219309316964869990163",
"294360439454152527808199495974781540585",
"170330277675488459509468124667336941004",
"184053942208226878460548629848761958422",
"240045722696411144875232246105586979129",
"93710467222427039179910580139128872663",
"209237957012120494894586662202902686465",
"147654122287567650578738412833181847981",
"24990523950584544933005789034442021776",
"1264985441848487617347146654540945009",
"133330517599374281998429843403409091794",
"127443196720502476492358266579536038067",
"3181874749795572638750267391225425145",
"307914191939463532258847797789855238334",
"286412164138618208239887763369097989485",
"307593036341876832873496387178886053544",
"180009021221470715406240491680011005097",
"156465678391889216761798254167431182266",
"82836382254405138165517379031607017540",
"227968830222571029245542858130173244620",
"67182187083228673263224222914878921244",
"57736110775017630481064347297403175377",
"302653350848325407386670540887022255768",
"286226533525041986095987183448852403072",
"80182737293428689637757344597563484626",
"142560442433471134166656314351965641631",
"17745141639070398683318578068814680478",
"218952618749510052119157813261456705701",
"102036494579086370049475867152140605174",
"201649383242728164902186177763329708614",
"284486070469665139152058084000943158718",
"282125080222604138545009578927394278576",
"209263334470273031857898668634517540189",
"97167674396009702908517784832796456039",
"228351455830612818484346341007161794228",
"3845685004980929502917890862926582016",
"90552866213243599336765302395377852569",
"104656373242435013484262366179006480249",
"190308209830565771410520664941609283320",
"223157110990009253730597991692455861773",
"65160796642085047173564505076705510442",
"67461273610231228418032117386320498105",
"99660230946440346439155050003271657315"
]
},
"source": "https://github.com/python/cpython/commit/991224b1e8311c85f198f6dd8208bf8cff7fc26f",
"id": "PSF-2026-25-dff6b0ea",
"signature_type": "Line",
"target": {
"file": "Modules/unicodedata.c"
}
},
{
"signature_version": "v1",
"deprecated": false,
"digest": {
"length": 2340.0,
"function_hash": "162589632402962372351893321289505254809"
},
"source": "https://github.com/python/cpython/commit/991224b1e8311c85f198f6dd8208bf8cff7fc26f",
"id": "PSF-2026-25-e319104f",
"signature_type": "Function",
"target": {
"function": "nfd_nfkd",
"file": "Modules/unicodedata.c"
}
}
]