{"id":"PYSEC-2026-2595","summary":"Linuxfabrik Monitoring Plugins: Sudoers may be able to obtain privilege escalation via /usr/bin/apt-get arguments","details":"### Summary\nIn the [Debian.sudoers](https://github.com/Linuxfabrik/monitoring-plugins/blob/main/assets/sudoers/Debian.sudoers) file, `apt-get` is allowed for the nagios user. The full command including the arguments are not enforced and can therefore be choosen arbitrarily. This allows to easily get a root shell as the nagios user:\n\n### PoC\nBy choosing a particular argument, you can get (as a nagios user) a root shell:\n```\nsudo apt-get update -o APT::Update::Pre-Invoke::=\"/bin/sh\"\n```\nSince the nagious user can use sudo to run apt-get as root, the resulting shell is also running as root.\n\n### Impact\nThe vulnerability is a local privilege escalation, impacting users who use the provided sudoers file. It requires that an attacker already compromised the nagios account (which is quite a high barrier to be honest).\n\n### Fix\nSince only one place where `apt-get` is currently used (in [deb-updates](https://github.com/Linuxfabrik/monitoring-plugins/blob/998302a5fb43e89df1359f4cbb6558f81c96ae4f/check-plugins/deb-updates/deb-updates#L124)) was found, it should be enough to allow only the specific arguments used there.\n\nHere an example how the line in the sudoers file could look like:\n```\n                    /usr/lib64/nagios/plugins/strongswan-connections,\\\n                    /usr/lib64/nagios/plugins/systemd-unit,\\\n                    /usr/bin/apt-get update --quiet 2\n```","aliases":["CVE-2026-52817","GHSA-8w6w-23mq-h8rg"],"modified":"2026-07-13T16:32:03.535840022Z","published":"2026-07-13T15:46:27.499597Z","references":[{"type":"WEB","url":"https://github.com/Linuxfabrik/monitoring-plugins/security/advisories/GHSA-8w6w-23mq-h8rg"},{"type":"PACKAGE","url":"https://github.com/Linuxfabrik/monitoring-plugins"},{"type":"PACKAGE","url":"https://pypi.org/project/linuxfabrik-lib"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-8w6w-23mq-h8rg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52817"}],"affected":[{"package":{"name":"linuxfabrik-lib","ecosystem":"PyPI","purl":"pkg:pypi/linuxfabrik-lib"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.0"}]}],"versions":["2.0.0.0","2.0.0.7","2.1.0.0","2.1.0.4","2.1.1.15","2.1.1.5","2.1.1.7","2.2.0","2.2.1","2.3.0","2.4.0","3.0.0","3.1.0","3.1.1","3.2.0","3.3.0","3.4.0","3.4.1","4.0.0","4.0.1","4.0.2","4.1.0","4.2.0","4.3.0","4.4.0","5.0.0"],"database_specific":{"source":"https://github.com/pypa/advisory-database/blob/main/vulns/linuxfabrik-lib/PYSEC-2026-2595.yaml"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"}]}