{"id":"CVE-2026-52817","aliases":["CVE-2026-52817","GHSA-8w6w-23mq-h8rg","PYSEC-2026-2595"],"related":[],"kind":"vulnerability","state":"published","title":"Linuxfabrik Monitoring Plugins Sudoers: /usr/bin/apt-get arguments allow privilege escalation","summary":"Linuxfabrik Monitoring Plugins provides monitoring plugins for Icinga, Nagios, and related systems. Prior to version 5.1.0, the shipped assets/sudoers/Debian.sudoers policy allowed the nagios or icinga account to execute /usr/bin/apt-get as root without restricting its arguments. An attacker who already controls that monitoring account can supply the APT::Update::Pre-Invoke option to execute an arbitrary command while apt-get runs with root privileges, resulting in a root shell and complete compromise of the host. The vulnerable rule supports the check-plugins/deb-updates/deb-updates plugin, but it authorized arbitrary apt-get argument sequences rather than only the required apt-get update --quiet 2 command. This issue is fixed in version 5.1.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Linuxfabrik Monitoring Plugins provides monitoring plugins for Icinga, Nagios, and related systems. Prior to version 5.1.0, the shipped assets/sudoers/Debian.sudoers policy allowed the nagios or icinga account to execute /usr/bin/apt-get as root without restricting its arguments. An attacker who already controls that monitoring account can supply the APT::Update::Pre-Invoke option to execute an arbitrary command while apt-get runs with root privileges, resulting in a root shell and complete compromise of the host. The vulnerable rule supports the check-plugins/deb-updates/deb-updates plugin, but it authorized arbitrary apt-get argument sequences rather than only the required apt-get update --quiet 2 command. This issue is fixed in version 5.1.0.","source":"cvelist"},{"lang":"en","text":"### 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```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Linuxfabrik Monitoring Plugins proporciona plugins de monitorización para Icinga, Nagios y sistemas relacionados. Antes de la versión 5.1.0, la política assets/sudoers/Debian.sudoers incluida permitía a la cuenta nagios o icinga ejecutar /usr/bin/apt-get como root sin restringir sus argumentos. Un atacante que ya controla esa cuenta de monitorización puede proporcionar la opción APT::Update::Pre-Invoke para ejecutar un comando arbitrario mientras apt-get se ejecuta con privilegios de root, lo que resulta en un shell de root y un compromiso completo del host. La regla vulnerable admite el plugin check-plugins/deb-updates/deb-updates, pero autorizaba secuencias de argumentos apt-get arbitrarias en lugar de solo el comando requerido apt-get update --quiet 2. Este problema está solucionado en la versión 5.1.0.","source":"nvd"}],"published":"2026-07-02T20:23:56.000Z","modified":"2026-10-22T22:10:00.250Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-88"],"affected":[{"ranges":[{"version":"< 5.1.0","status":"affected"}],"vendor":"Linuxfabrik","product":"monitoring-plugins","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.1.0"}],"ecosystem":"PyPI","package":"linuxfabrik-lib","purl":"pkg:pypi/linuxfabrik-lib","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.1.0"}],"ecosystem":"PyPI","package":"linuxfabrik-lib","purl":"pkg:pypi/linuxfabrik-lib","source":"pysec"}],"references":[{"url":"https://github.com/Linuxfabrik/monitoring-plugins/security/advisories/GHSA-8w6w-23mq-h8rg","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Linuxfabrik/monitoring-plugins/commit/694b5daeebadc9a51428f3de1acff7b1f737642f","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Linuxfabrik/monitoring-plugins/blob/main/CHANGELOG.md#v510---2026-05-30","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Linuxfabrik/monitoring-plugins/releases/tag/v5.1.0","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Linuxfabrik/monitoring-plugins","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/linuxfabrik-lib","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-8w6w-23mq-h8rg","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52817","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-08-19T19:03:21.047Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-52817","url":"https://www.cve.org/CVERecord?id=CVE-2026-52817","licence":"CVE Terms of Use","modified":"2026-08-19T19:03:29.652Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8w6w-23mq-h8rg","url":"https://github.com/advisories/GHSA-8w6w-23mq-h8rg","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:32.446Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-52817","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52817","licence":"Public domain","modified":"2026-10-22T22:10:00.250Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2595","url":"https://osv.dev/vulnerability/PYSEC-2026-2595","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:03.535Z"}],"updatedAt":"2026-11-25T22:59:33.582Z","epss":{"score":0.00244,"percentile":0.16752,"date":"2026-12-01T12:00:22.000Z"}}