{"id":"CVE-2026-52817","aliases":["GHSA-8w6w-23mq-h8rg","PYSEC-2026-2595"],"url":"https://o3.security/vulnerability/CVE-2026-52817","summary":"Linuxfabrik Monitoring Plugins Sudoers: /usr/bin/apt-get arguments allow privilege escalation","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```","published":"2026-08-18T20:53:22.189Z","modified":"2026-10-24T02:30:37.353028390Z","cvss":null,"epss":{"score":0.00244,"percentile":0.15854,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"linuxfabrik-lib","fixedVersion":"5.1.0"}],"fix":{"url":"https://github.com/Linuxfabrik/monitoring-plugins/commit/694b5daeebadc9a51428f3de1acff7b1f737642f","label":"Linuxfabrik/monitoring-plugins@694b5da"},"references":[{"type":"WEB","url":"https://github.com/Linuxfabrik/monitoring-plugins/blob/main/CHANGELOG.md#v510---2026-05-30"},{"type":"WEB","url":"https://github.com/Linuxfabrik/monitoring-plugins/releases/tag/v5.1.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52817.json"},{"type":"ADVISORY","url":"https://github.com/Linuxfabrik/monitoring-plugins/security/advisories/GHSA-8w6w-23mq-h8rg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52817"},{"type":"FIX","url":"https://github.com/Linuxfabrik/monitoring-plugins/commit/694b5daeebadc9a51428f3de1acff7b1f737642f"},{"type":"PACKAGE","url":"https://github.com/Linuxfabrik/monitoring-plugins"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-24T02:30:37.353028390Z"}}