Issue46948
Created on 2022-03-07 16:33 by steve.dower, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 31726 | merged | steve.dower, 2022-03-07 16:36 | |
| PR 31727 | merged | steve.dower, 2022-03-07 16:38 | |
| PR 31728 | merged | steve.dower, 2022-03-07 16:40 | |
| PR 31729 | merged | steve.dower, 2022-03-07 16:42 | |
| PR 31730 | merged | steve.dower, 2022-03-07 16:43 | |
| PR 31920 | merged | steve.dower, 2022-03-16 00:18 | |
| PR 31922 | merged | miss-islington, 2022-03-16 00:46 | |
| PR 31923 | merged | miss-islington, 2022-03-16 00:46 | |
| PR 31924 | merged | miss-islington, 2022-03-16 00:47 | |
| PR 31925 | merged | miss-islington, 2022-03-16 00:47 | |
| Messages (16) | |||
|---|---|---|---|
| msg414673 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-07 16:33 | |
CVE-2022-26488 is an escalation of privilege vulnerability in the Windows installer for the following releases of CPython: * 3.11.0a6 and earlier * 3.10.2 and earlier * 3.9.10 and earlier * 3.8.12 and earlier * All end-of-life releases of 3.5, 3.6 and 3.7 The vulnerability exists when installed for all users, and when the "Add Python to PATH" option has been selected. A local user without administrative permissions can trigger a repair operation that adds incorrect additional paths to the system PATH variable, and then use search path hijacking to achieve escalation of privilege. Per-user installs (the default) are also affected, but cannot be used for escalation of privilege. Besides updating, this vulnerability may be mitigated by modifying an existing install to disable the "Add Python to PATH" or "Add Python to environment variables" option. Manually adding the install directory to PATH is not affected. Thanks to the Lockheed Martin Red Team for detecting and reporting the issue to the Python Security Response Team. |
|||
| msg414678 - (view) | Author: Pablo Galindo Salgado (pablogsal) * ![]() |
Date: 2022-03-07 17:05 | |
The 3.11.0a6 release is ongoing. I assume is ok to not block this release on this issue, given that an alpha is inherently unsafe |
|||
| msg414679 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-07 17:12 | |
Yeah, this is fine to still be in alpha 6. Very unlikely that anyone is making it a system-wide default anyway, and certainly not in secure/production systems. |
|||
| msg414681 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-07 17:23 | |
New changeset 136842c91b5783e205e217c4855baa9dadd4ad41 by Steve Dower in branch '3.10': bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31727) https://github.com/python/cpython/commit/136842c91b5783e205e217c4855baa9dadd4ad41 |
|||
| msg414682 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-07 17:23 | |
New changeset 77446d2aa56e9e3262d9d2247342bbbb0ff5e907 by Steve Dower in branch 'main': bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31726) https://github.com/python/cpython/commit/77446d2aa56e9e3262d9d2247342bbbb0ff5e907 |
|||
| msg414683 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-07 17:23 | |
New changeset 101a1bee1953b82339115c5e648e1717359c78eb by Steve Dower in branch '3.9': bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31728) https://github.com/python/cpython/commit/101a1bee1953b82339115c5e648e1717359c78eb |
|||
| msg414685 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2022-03-07 17:37 | |
New changeset 97476271275a4bd1340230677b7301d7b78b3317 by Steve Dower in branch '3.7': bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31730) https://github.com/python/cpython/commit/97476271275a4bd1340230677b7301d7b78b3317 |
|||
| msg414711 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2022-03-08 01:56 | |
Is there anything on our end we can do to prevent this kind of issue in the future? Am I wrong to see this as just fixing our package to avoid a design flaw in Windows OS level package management? Certainly other packages in the world must run into similar problems. |
|||
| msg414733 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
Date: 2022-03-08 09:04 | |
New changeset cff1b78c1dfb2a62b1e16fabc5f43bc3634d9de7 by Steve Dower in branch '3.8': bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31729) https://github.com/python/cpython/commit/cff1b78c1dfb2a62b1e16fabc5f43bc3634d9de7 |
|||
| msg414752 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-08 13:29 | |
> Is there anything on our end we can do to prevent this kind of issue in the future? Probably not, I think it's just a lesson learned about the capabilities of the MSI format and its integration with Windows (well, we could hurry up moving everyone to the Windows Store, which doesn't have this issue, but that seems unlikely ;) ) Similar issues have been reported to the Windows Installer team (e.g. CVE-2021-41379, CVE-2021-26415) that could have been fixed by disabling the unelevated repair function, but weren't. So I think it just has to become a known thing for people building MSIs that a "repair" can be run by non-elevated users, and install-time variables may not be preserved for the repair. (In our case, that means actually searching for the existing install rather than trusting the variable our bundle normally provides to the MSI.) |
|||
| msg415306 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-16 00:07 | |
The fix for this regressed the installer for the py.exe launcher, which breaks our release builds. I'm patching it now. It's going under the same issue number because it will be needed for anyone applying this patch directly and then building the installer themselves. |
|||
| msg415309 - (view) | Author: Steve Dower (steve.dower) * ![]() |
Date: 2022-03-16 00:46 | |
New changeset 708812085355c92f32e547d1f1d1f29aefbbc27e by Steve Dower in branch 'main': bpo-46948: Fix launcher installer build failure due to first part of fix (GH-31920) https://github.com/python/cpython/commit/708812085355c92f32e547d1f1d1f29aefbbc27e |
|||
| msg415310 - (view) | Author: miss-islington (miss-islington) | Date: 2022-03-16 01:13 | |
New changeset 58d30b992d67c8471f79a7307e4c1cda64311e3b by Miss Islington (bot) in branch '3.10': bpo-46948: Fix launcher installer build failure due to first part of fix (GH-31920) https://github.com/python/cpython/commit/58d30b992d67c8471f79a7307e4c1cda64311e3b |
|||
| msg415314 - (view) | Author: miss-islington (miss-islington) | Date: 2022-03-16 01:30 | |
New changeset 70eb9db39817a8f9abef801a2a4a7bb2c7411654 by Miss Islington (bot) in branch '3.9': bpo-46948: Fix launcher installer build failure due to first part of fix (GH-31920) https://github.com/python/cpython/commit/70eb9db39817a8f9abef801a2a4a7bb2c7411654 |
|||
| msg415317 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2022-03-16 02:00 | |
New changeset 4a1d65fe8528c3a6e0cf2f4f9d4b58249164589d by Miss Islington (bot) in branch '3.7': bpo-46948: Fix launcher installer build failure due to first part of fix (GH-31920) (GH-31925) https://github.com/python/cpython/commit/4a1d65fe8528c3a6e0cf2f4f9d4b58249164589d |
|||
| msg415331 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
Date: 2022-03-16 10:12 | |
New changeset 2b97cfdce8df9d0d455f65a22b1e0d34a29dc200 by Miss Islington (bot) in branch '3.8': bpo-46948: Fix launcher installer build failure due to first part of fix (GH-31920) (GH-31924) https://github.com/python/cpython/commit/2b97cfdce8df9d0d455f65a22b1e0d34a29dc200 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:57 | admin | set | github: 91104 |
| 2022-03-16 12:23:48 | steve.dower | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2022-03-16 10:12:15 | lukasz.langa | set | messages: + msg415331 |
| 2022-03-16 02:00:38 | ned.deily | set | messages: + msg415317 |
| 2022-03-16 01:30:14 | miss-islington | set | messages: + msg415314 |
| 2022-03-16 01:13:15 | miss-islington | set | messages: + msg415310 |
| 2022-03-16 00:47:07 | miss-islington | set | pull_requests: + pull_request30016 |
| 2022-03-16 00:47:02 | miss-islington | set | pull_requests: + pull_request30015 |
| 2022-03-16 00:46:54 | miss-islington | set | pull_requests: + pull_request30014 |
| 2022-03-16 00:46:49 | miss-islington | set | nosy:
+ miss-islington pull_requests: + pull_request30013 |
| 2022-03-16 00:46:37 | steve.dower | set | messages: + msg415309 |
| 2022-03-16 00:18:38 | steve.dower | set | stage: needs patch -> patch review pull_requests: + pull_request30011 |
| 2022-03-16 00:07:13 | steve.dower | set | status: closed -> open resolution: fixed -> (no value) messages: + msg415306 stage: resolved -> needs patch |
| 2022-03-08 13:29:59 | steve.dower | set | status: open -> closed resolution: fixed messages: + msg414752 stage: patch review -> resolved |
| 2022-03-08 09:04:35 | lukasz.langa | set | messages: + msg414733 |
| 2022-03-08 01:56:17 | gregory.p.smith | set | nosy:
+ gregory.p.smith messages: + msg414711 |
| 2022-03-07 17:37:37 | ned.deily | set | messages: + msg414685 |
| 2022-03-07 17:23:35 | steve.dower | set | messages: + msg414683 |
| 2022-03-07 17:23:31 | steve.dower | set | messages: + msg414682 |
| 2022-03-07 17:23:31 | steve.dower | set | messages: + msg414681 |
| 2022-03-07 17:12:50 | steve.dower | set | messages: + msg414679 |
| 2022-03-07 17:05:48 | pablogsal | set | messages: + msg414678 |
| 2022-03-07 16:43:40 | steve.dower | set | pull_requests: + pull_request29847 |
| 2022-03-07 16:42:33 | steve.dower | set | pull_requests: + pull_request29846 |
| 2022-03-07 16:40:53 | steve.dower | set | pull_requests: + pull_request29845 |
| 2022-03-07 16:38:53 | steve.dower | set | pull_requests: + pull_request29844 |
| 2022-03-07 16:36:27 | steve.dower | set | keywords:
+ patch stage: needs patch -> patch review pull_requests: + pull_request29843 |
| 2022-03-07 16:33:18 | steve.dower | create | |
