Security advisory
A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow unprivileged users to run commands as privileged users according predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands. An attacker can leverage this by crafting environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully executed the attack can cause a local privilege escalation given unprivileged users administrative rights on the target machine.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-4034
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:38 UTC · Revision 1
Source evidence
A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow unprivileged users to run commands as privileged users according predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands. An attacker can leverage this by crafting environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully executed the attack can cause a local privilege escalation given unprivileged users administrative rights on the target machine.
osv:CVE-2021-4034
Complete source record
{
"id": "ee44e5af3f5c0784e19e95ea69d867b7313d390be8c4fe640abc98e3f556d6d0",
"url": "https://osv.dev/vulnerability/CVE-2021-4034",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-4034",
"summary": "A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow unprivileged users to run commands as privileged users according predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands. An attacker can leverage this by crafting environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully executed the attack can cause a local privilege escalation given unprivileged users administrative rights on the target machine.",
"evidence": "osv:CVE-2021-4034",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-4034",
"aliases": [
"CVE-2021-4034"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://gitlab.freedesktop.org/polkit/polkit",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "827b0ddac5b1ef00a47fca4526fcf057bee5f1db"
},
{
"fixed": "a2bf5c9c83b6ae46cbd5c779d3055bff81ded683"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:polkit_project:polkit:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "121"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "a2bf5c9c83b6ae46cbd5c779d3055bff81ded683"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"0.120",
"0.119",
"0.118",
"0.117",
"0.116",
"0.115",
"0.114",
"0.113",
"0.112",
"0.111",
"0.110",
"0.109",
"0.108",
"0.107",
"0.106",
"0.105",
"0.104",
"0.103",
"0.102",
"0.96",
"0.101",
"0.100",
"0.99",
"0.98",
"0.97",
"0.95",
"0.94",
"0.93",
"0.92",
"0.91",
"POLICY_KIT_0_9",
"POLICY_KIT_0_8",
"POLICY_KIT_0_7",
"POLICY_KIT_0_6",
"POLICY_KIT_0_5",
"POLICY_KIT_0_4",
"POLICY_KIT_0_3",
"start"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-4034.json",
"vanir_signatures": [
{
"id": "CVE-2021-4034-314cbecc",
"digest": {
"length": 9742,
"function_hash": "32570418561053402702943127759871466400"
},
"source": "https://gitlab.freedesktop.org/polkit/polkit@a2bf5c9c83b6ae46cbd5c779d3055bff81ded683",
"target": {
"file": "src/programs/pkexec.c",
"function": "main"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-4034-925219d0",
"digest": {
"threshold": 0.9,
"line_hashes": [
"213998750295636857179079909536485960320",
"278734282904971204434169771972003805228",
"19650700869071089274018684711323071243",
"168828756042991529351455686026289160629",
"40690998152194075775332422815916804684",
"13939387846029825278873453783023749278",
"252652119165071349920865803595180110656",
"70320173189091660192941128994028468583",
"107583928421380347849317833122769418756",
"306196123157583984374424451218656751827",
"144736080548638912673426995235414810295",
"98087446916703697762879769665415488591",
"218819539977279485871861530533275995832",
"32024447173852229240787042447495035321"
]
},
"source": "https://gitlab.freedesktop.org/polkit/polkit@a2bf5c9c83b6ae46cbd5c779d3055bff81ded683",
"target": {
"file": "src/programs/pkexec.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2021-4034-bd0a4981",
"digest": {
"length": 5706,
"function_hash": "48916128638231852043721993153747674346"
},
"source": "https://gitlab.freedesktop.org/polkit/polkit@a2bf5c9c83b6ae46cbd5c779d3055bff81ded683",
"target": {
"file": "src/programs/pkcheck.c",
"function": "main"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-4034-e0984eb7",
"digest": {
"threshold": 0.9,
"line_hashes": [
"273856761981597668010333138287779505402",
"173734811988144302255653828186019334929",
"215501817520057129252303208780659306627"
]
},
"source": "https://gitlab.freedesktop.org/polkit/polkit@a2bf5c9c83b6ae46cbd5c779d3055bff81ded683",
"target": {
"file": "src/programs/pkcheck.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:08:49Z"
}
}
],
"modified": "2026-10-20T14:08:49.590159484Z",
"provider": "osv",
"references": [
"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-4034",
"https://access.redhat.com/security/vulnerabilities/RHSB-2022-001",
"https://cert-portal.siemens.com/productcert/pdf/ssa-330556.pdf",
"https://www.starwindsoftware.com/security/sw-20220818-0001/",
"https://www.suse.com/support/kb/doc/?id=000020564",
"https://bugzilla.redhat.com/show_bug.cgi?id=2025869",
"https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683",
"https://www.oracle.com/security-alerts/cpuapr2022.html",
"https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt",
"https://www.secpod.com/blog/local-privilege-escalation-vulnerability-in-major-linux-distributions-cve-2021-4034/",
"https://www.vicarius.io/vsociety/posts/pwnkit-pkexec-lpe-cve-2021-4034"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:siemens:scalance_lpe9403_firmware:*:*:*:*:*:*:*:*"
],
"vendor_product": "siemens:scalance_lpe9403_firmware",
"extracted_events": [
{
"range": [
{
"fixed": "2.0"
}
],
"source": "CPE_RANGE"
}
]
},
{
"cpes": [
"cpe:2.3:a:siemens:sinumerik_edge:*:*:*:*:*:*:*:*"
],
"vendor_product": "siemens:sinumerik_edge",
"extracted_events": [
{
"range": [
{
"fixed": "3.3.0"
}
],
"source": "CPE_RANGE"
}
]
},
{
"cpes": [
"cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:20.04:*:*:*:lts:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:21.10:*:*:*:*:*:*:*"
],
"vendor_product": "canonical:ubuntu_linux",
"extracted_events": [
{
"range": [
{
"introduced": "14.04"
},
{
"last_affected": "14.04"
},
{
"introduced": "16.04"
},
{
"last_affected": "16.04"
},
{
"introduced": "18.04"
},
{
"last_affected": "18.04"
},
{
"introduced": "20.04"
},
{
"last_affected": "20.04"
},
{
"introduced": "21.10"
},
{
"last_affected": "21.10"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:oracle:http_server:12.2.1.3.0:*:*:*:*:*:*:*",
"cpe:2.3:a:oracle:http_server:12.2.1.4.0:*:*:*:*:*:*:*"
],
"vendor_product": "oracle:http_server",
"extracted_events": [
{
"range": [
{
"introduced": "12.2.1.3.0"
},
{
"last_affected": "12.2.1.3.0"
},
{
"introduced": "12.2.1.4.0"
},
{
"last_affected": "12.2.1.4.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*"
],
"vendor_product": "oracle:zfs_storage_appliance_kit",
"extracted_events": [
{
"range": [
{
"introduced": "8.8"
},
{
"last_affected": "8.8"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux",
"extracted_events": [
{
"range": [
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_desktop",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_eus:8.2:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_eus",
"extracted_events": [
{
"range": [
{
"introduced": "8.2"
},
{
"last_affected": "8.2"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems:7.0:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems:8.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_ibm_z_systems",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
},
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus:8.2:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus:8.4:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_ibm_z_systems_eus",
"extracted_events": [
{
"range": [
{
"introduced": "8.2"
},
{
"last_affected": "8.2"
},
{
"introduced": "8.4"
},
{
"last_affected": "8.4"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_power_big_endian:7.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_power_big_endian",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian:7.0:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian:8.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_power_little_endian",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
},
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:8.1:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:8.2:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:8.4:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_power_little_endian_eus",
"extracted_events": [
{
"range": [
{
"introduced": "8.1"
},
{
"last_affected": "8.1"
},
{
"introduced": "8.2"
},
{
"last_affected": "8.2"
},
{
"introduced": "8.4"
},
{
"last_affected": "8.4"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_scientific_computing:7.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_scientific_computing",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server",
"extracted_events": [
{
"range": [
{
"introduced": "6.0"
},
{
"last_affected": "6.0"
},
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_server_aus:7.3:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_aus:8.2:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_aus:8.4:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server_aus",
"extracted_events": [
{
"range": [
{
"introduced": "7.3"
},
{
"last_affected": "7.3"
},
{
"introduced": "7.4"
},
{
"last_affected": "7.4"
},
{
"introduced": "7.6"
},
{
"last_affected": "7.6"
},
{
"introduced": "7.7"
},
{
"last_affected": "7.7"
},
{
"introduced": "8.2"
},
{
"last_affected": "8.2"
},
{
"introduced": "8.4"
},
{
"last_affected": "8.4"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_server_eus:8.4:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server_eus",
"extracted_events": [
{
"range": [
{
"introduced": "8.4"
},
{
"last_affected": "8.4"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_tus:8.2:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_tus:8.4:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server_tus",
"extracted_events": [
{
"range": [
{
"introduced": "7.6"
},
{
"last_affected": "7.6"
},
{
"introduced": "7.7"
},
{
"last_affected": "7.7"
},
{
"introduced": "8.2"
},
{
"last_affected": "8.2"
},
{
"introduced": "8.4"
},
{
"last_affected": "8.4"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:redhat:enterprise_linux_server_update_services_for_sap_solutions:7.6:*:*:*:*:*:*:*",
"cpe:2.3:a:redhat:enterprise_linux_server_update_services_for_sap_solutions:7.7:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_update_services_for_sap_solutions:8.1:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_update_services_for_sap_solutions:8.2:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux_server_update_services_for_sap_solutions:8.4:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server_update_services_for_sap_solutions",
"extracted_events": [
{
"range": [
{
"introduced": "7.6"
},
{
"last_affected": "7.6"
},
{
"introduced": "7.7"
},
{
"last_affected": "7.7"
},
{
"introduced": "8.1"
},
{
"last_affected": "8.1"
},
{
"introduced": "8.2"
},
{
"last_affected": "8.2"
},
{
"introduced": "8.4"
},
{
"last_affected": "8.4"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_workstation",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:starwindsoftware:command_center:1.0:update3_build5871:*:*:*:*:*:*"
],
"vendor_product": "starwindsoftware:command_center",
"extracted_events": [
{
"range": [
{
"introduced": "1.0-update3_build5871"
},
{
"last_affected": "1.0-update3_build5871"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:starwindsoftware:starwind_virtual_san:v8:build14338:*:*:*:*:*:*"
],
"vendor_product": "starwindsoftware:starwind_virtual_san",
"extracted_events": [
{
"range": [
{
"introduced": "v8-build14338"
},
{
"last_affected": "v8-build14338"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:suse:enterprise_storage:7.0:*:*:*:*:*:*:*"
],
"vendor_product": "suse:enterprise_storage",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:suse:linux_enterprise_desktop:15:sp2:*:*:*:*:*:*"
],
"vendor_product": "suse:linux_enterprise_desktop",
"extracted_events": [
{
"range": [
{
"introduced": "15-sp2"
},
{
"last_affected": "15-sp2"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:suse:linux_enterprise_high_performance_computing:15.0:sp2:*:*:-:*:*:*"
],
"vendor_product": "suse:linux_enterprise_high_performance_computing",
"extracted_events": [
{
"range": [
{
"introduced": "15.0-sp2"
},
{
"last_affected": "15.0-sp2"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:suse:linux_enterprise_server:15:sp2:*:*:*:-:*:*",
"cpe:2.3:o:suse:linux_enterprise_server:15:sp2:*:*:*:sap:*:*"
],
"vendor_product": "suse:linux_enterprise_server",
"extracted_events": [
{
"range": [
{
"introduced": "15-sp2"
},
{
"last_affected": "15-sp2"
},
{
"introduced": "15-sp2"
},
{
"last_affected": "15-sp2"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:suse:linux_enterprise_workstation_extension:12:sp5:*:*:*:*:*:*"
],
"vendor_product": "suse:linux_enterprise_workstation_extension",
"extracted_events": [
{
"range": [
{
"introduced": "12-sp5"
},
{
"last_affected": "12-sp5"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:suse:manager_proxy:4.1:*:*:*:*:*:*:*"
],
"vendor_product": "suse:manager_proxy",
"extracted_events": [
{
"range": [
{
"introduced": "4.1"
},
{
"last_affected": "4.1"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:suse:manager_server:4.1:*:*:*:*:*:*:*"
],
"vendor_product": "suse:manager_server",
"extracted_events": [
{
"range": [
{
"introduced": "4.1"
},
{
"last_affected": "4.1"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-4034",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388580,
"published_at": "2022-01-28T20:15:12.193+00:00"
}