{"id":"CVE-2026-6879","state":"PUBLISHED","title":"Quadratic Behavior in xml.etree.ElementPath Index Predicates","description":"`Element.findall()` and fully-consumed `Element.iterfind()` exhibit `O(n^2)` time complexity when using XPath index predicates (e.g. `[1]`, `[last()]`, `[last()-N]`) on XML documents with many same-tag siblings. `Element.find()` is only affected when the first match is near the end  of the sibling list, such as with `[last()]` or `[last()-N]`;  `.//item[1]` short-circuits after the first match.","publishedAt":"2026-07-28T13:46:30.650Z","updatedAt":"2026-08-13T00:27:08.214Z","severity":{"score":2,"label":"Low","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","source":"PSF"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.21","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.16","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.14","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.15","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.7","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0rc1","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"references":["https://github.com/python/cpython/pull/152676","https://github.com/python/cpython/issues/152674","https://mail.python.org/archives/list/security-announce@python.org/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/","https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0","https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81","https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db","https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3","https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02","https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85","https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70"],"weaknesses":["CWE-407"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/6xxx/CVE-2026-6879.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-6879","state":"PUBLISHED","datePublished":"2026-07-28T13:46:30.650Z","dateUpdated":"2026-08-13T00:27:08.214Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2026-04-22T18:26:56.743Z"},"containers":{"cna":{"title":"Quadratic Behavior in xml.etree.ElementPath Index Predicates","descriptions":[{"lang":"en","value":"`Element.findall()` and fully-consumed `Element.iterfind()` exhibit `O(n^2)` time complexity when using XPath index predicates (e.g. `[1]`, `[last()]`, `[last()-N]`) on XML documents with many same-tag siblings. `Element.find()` is only affected when the first match is near the end  of the sibling list, such as with `[last()]` or `[last()-N]`;  `.//item[1]` short-circuits after the first match."}],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.21","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.16","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.14","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.15","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.7","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0rc1","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"references":[{"url":"https://github.com/python/cpython/pull/152676","tags":["patch"]},{"url":"https://github.com/python/cpython/issues/152674","tags":["issue-tracking"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"HIGH","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":2,"baseSeverity":"LOW","exploitMaturity":"NOT_DEFINED","privilegesRequired":"HIGH","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"PASSIVE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2026-08-13T00:27:08.214Z"},"credits":[{"lang":"en","type":"reporter","value":"dm (https://github.com/DarkaMaul)"},{"lang":"en","type":"coordinator","value":"Petr Viktorin (https://github.com/encukou)"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-28T14:49:33.309576Z","id":"CVE-2026-6879","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-407","type":"CWE","lang":"en","description":"CWE-407 Inefficient Algorithmic Complexity"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-28T14:54:07.235Z"}}]}}}