urlsplit does not handle NFKC normalization¶
URLs encoded with Punycode/IDNA use NFKC normalization to decompose characters. This can result in some characters introducing new segments into a URL.
See Unicode® Technical Standard #46: Unicode IDNA Compatibility Processing.
Dates:
- Disclosure date: 2019-03-06 (Python issue bpo-36216 reported)
- Reported at: 2019-02-16 (email to PSRT)
- Reported by: Jonathan Birch of Microsoft Corporation and Panayiotis Panayiotou
Fixed In¶
- Python 2.7.17 (2019-10-19) fixed by commit e37ef41 (branch 2.7) (2019-03-07)
- Python 3.5.7 (2019-03-18) fixed by commit c0d9511 (branch 3.5) (2019-03-11)
- Python 3.6.9 (2019-07-02) fixed by commit 23fc041 (branch 3.6) (2019-03-12)
- Python 3.7.3 (2019-03-25) fixed by commit daad2c4 (branch 3.7) (2019-03-07)
- Python 3.8.0 (2019-10-14) fixed by commit 16e6f7d (branch 3.8) (2019-03-07)
Python issue¶
CVE-2019-9636: urlsplit does not handle NFKC normalization.
- Python issue: bpo-36216
- Creation date: 2019-03-06
- Reporter: Steve Dower
CVE-2019-9636¶
Python 2.7.x through 2.7.16 and 3.x through 3.7.2 is affected by: Improper Handling of Unicode Encoding (with an incorrect netloc) during NFKC normalization. The impact is: Information disclosure (credentials, cookies, etc. that are cached against a given hostname). The components are: urllib.parse.urlsplit, urllib.parse.urlparse. The attack vector is: A specially crafted URL could be incorrectly parsed to locate cookies or authentication data and send that information to a different host than when parsed correctly. This is fixed in: v2.7.17, v2.7.17rc1, v2.7.18, v2.7.18rc1; v3.5.10, v3.5.10rc1, v3.5.7, v3.5.8, v3.5.8rc1, v3.5.8rc2, v3.5.9; v3.6.10, v3.6.10rc1, v3.6.11, v3.6.11rc1, v3.6.12, v3.6.9, v3.6.9rc1; v3.7.3, v3.7.3rc1, v3.7.4, v3.7.4rc1, v3.7.4rc2, v3.7.5, v3.7.5rc1, v3.7.6, v3.7.6rc1, v3.7.7, v3.7.7rc1, v3.7.8, v3.7.8rc1, v3.7.9.
- CVE ID: CVE-2019-9636
- Published: 2019-03-08
- CVSS Score: 5.0
Timeline¶
Timeline using the disclosure date 2019-03-06 as reference:
- 2019-02-16 (-18 days): Reported (email to PSRT)
- 2019-03-06: Python issue bpo-36216 reported by Steve Dower
- 2019-03-07 (+1 days): commit 16e6f7d (branch 3.8)
- 2019-03-07 (+1 days): commit daad2c4 (branch 3.7)
- 2019-03-07 (+1 days): commit e37ef41 (branch 2.7)
- 2019-03-08 (+2 days): CVE-2019-9636 published
- 2019-03-11 (+5 days): commit c0d9511 (branch 3.5)
- 2019-03-12 (+6 days): commit 23fc041 (branch 3.6)
- 2019-03-18 (+12 days): Python 3.5.7 released
- 2019-03-25 (+19 days): Python 3.7.3 released
- 2019-07-02 (+118 days): Python 3.6.9 released
- 2019-10-14: Python 3.8.0 released
- 2019-10-19 (+227 days): Python 2.7.17 released