{"id":"CVE-2026-6879","aliases":["CVE-2026-6879","PSF-2026-34","BIT-LIBPYTHON-2026-6879","BIT-PYTHON-2026-6879","BIT-PYTHON-MIN-2026-6879"],"related":[],"kind":"vulnerability","state":"published","title":"Quadratic Behavior in xml.etree.ElementPath Index Predicates","summary":"`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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"`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.","source":"cvelist"},{"lang":"es","text":"“Element.findall()” y “Element.iterfind()” completamente consumido exhiben una complejidad temporal de “O(n^2)” al usar predicados de índice XPath (p. ej. “[1]”, “[last()]”, “[last()-N]”) en documentos XML con muchos hermanos de la misma etiqueta. “Element.find()” solo se ve afectado cuando la primera coincidencia está cerca del final de la lista de hermanos, como con “[last()]” o “[last()-N]”; “.//item[1]” hace un cortocircuito después de la primera coincidencia.","source":"nvd"}],"published":"2026-07-28T13:46:30.650Z","modified":"2026-10-24T13:10:00.147Z","severity":{"scorer":"PSF","scheme":"CVSS: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","score":2,"rating":"LOW"},"severities":[{"scorer":"PSF","scheme":"CVSS: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","score":2,"rating":"LOW"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"LOW"}],"cwes":["CWE-407"],"affected":[{"ranges":[{"type":"python","introduced":"0","fixed":"3.10.21","status":"affected"},{"type":"python","introduced":"3.11.0","fixed":"3.11.16","status":"affected"},{"type":"python","introduced":"3.12.0","fixed":"3.12.14","status":"affected"},{"type":"python","introduced":"3.13.0","fixed":"3.13.15","status":"affected"},{"type":"python","introduced":"3.14.0","fixed":"3.14.7","status":"affected"},{"type":"python","introduced":"3.15.0a1","fixed":"3.15.0rc1","status":"affected"}],"vendor":"Python Software Foundation","product":"CPython","repo":"https://github.com/python/cpython","source":"cvelist"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"2ffab083782968a4d732738f4f1dff6bbd69d2b0"},{"type":"git","status":"affected","fixed":"02c08e6b747ac43d0d866a4ffa916bedf3423f81"},{"type":"git","status":"affected","fixed":"390337b8ba1658833fdef379e1739c9f9533a8db"},{"type":"git","status":"affected","fixed":"cb409342a19f25656f62e679f8bac265fe1442c3"},{"type":"git","status":"affected","fixed":"96510a3758f4a075f43223afdee3b6ee1a7a7f02"},{"type":"git","status":"affected","fixed":"037965c00a427cba5c05447efadc67c51a492e85"},{"type":"git","status":"affected","fixed":"0583f24ae678993e3f7939f51ad5bcae5ad9dc70"}],"repo":"https://github.com/python/cpython","source":"psf"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.10.21"},{"type":"semver","introduced":"3.11.0","status":"affected","fixed":"3.11.16"},{"type":"semver","introduced":"3.12.0","status":"affected","fixed":"3.12.14"},{"type":"semver","introduced":"3.13.0","status":"affected","fixed":"3.13.15"},{"type":"semver","introduced":"3.14.0","status":"affected","fixed":"3.14.7"}],"ecosystem":"Bitnami","package":"libpython","purl":"pkg:bitnami/libpython","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.10.21"},{"type":"semver","introduced":"3.11.0","status":"affected","fixed":"3.11.16"},{"type":"semver","introduced":"3.12.0","status":"affected","fixed":"3.12.14"},{"type":"semver","introduced":"3.13.0","status":"affected","fixed":"3.13.15"},{"type":"semver","introduced":"3.14.0","status":"affected","fixed":"3.14.7"}],"ecosystem":"Bitnami","package":"python","purl":"pkg:bitnami/python","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.10.21"},{"type":"semver","introduced":"3.11.0","status":"affected","fixed":"3.11.16"},{"type":"semver","introduced":"3.12.0","status":"affected","fixed":"3.12.14"},{"type":"semver","introduced":"3.13.0","status":"affected","fixed":"3.13.15"},{"type":"semver","introduced":"3.14.0","status":"affected","fixed":"3.14.7"}],"ecosystem":"Bitnami","package":"python-min","purl":"pkg:bitnami/python-min","source":"bitnami"}],"references":[{"url":"https://github.com/python/cpython/pull/152676","tags":["patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/issues/152674","tags":["issue-tracking","report","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/","tags":["advisory","vendor-advisory","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70","tags":["fix","patch","web"],"sources":["cvelist","psf","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-6879","tags":["web"],"sources":["bitnami"]}],"credits":["dm (https://github.com/DarkaMaul)","Petr Viktorin (https://github.com/encukou)"],"assigner":"PSF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-28T14:49:33.309Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-6879","url":"https://www.cve.org/CVERecord?id=CVE-2026-6879","licence":"CVE Terms of Use","modified":"2026-08-13T00:27:08.214Z"},{"source":"psf","name":"Python Software Foundation","id":"PSF-2026-34","url":"https://osv.dev/vulnerability/PSF-2026-34","licence":"CC-BY-4.0","modified":"2026-08-17T08:10:57.238Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-6879","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-6879","licence":"Public domain","modified":"2026-10-24T13:10:00.147Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-LIBPYTHON-2026-6879","url":"https://osv.dev/vulnerability/BIT-LIBPYTHON-2026-6879","licence":"Apache-2.0","modified":"2026-08-19T09:45:17.545Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTHON-2026-6879","url":"https://osv.dev/vulnerability/BIT-PYTHON-2026-6879","licence":"Apache-2.0","modified":"2026-08-19T09:45:25.966Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTHON-MIN-2026-6879","url":"https://osv.dev/vulnerability/BIT-PYTHON-MIN-2026-6879","licence":"Apache-2.0","modified":"2026-08-19T09:45:25.652Z"}],"updatedAt":"2026-11-25T22:59:30.338Z","epss":{"score":0.00355,"percentile":0.31251,"date":"2026-12-02T12:00:21.000Z"}}