{"id":"CVE-2026-54161","summary":"upsmon: remote OS command injection (RCE) via attacker-controlled ups.alarm in NOTIFYCMD execution","details":"Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS, PDU and SCD hardware. From 2.8.3 to 2.8.5, upsmon in clients/upsmon.c inserts the server-supplied ups.alarm value into shell commands executed by notify(), async_notify(), and wall(). When a monitored device reports an ALARM state and an operator has configured NOTIFYCMD with EXEC in NOTIFYFLAG ALARM, shell metacharacters in the alarm text are evaluated on POSIX or Windows and can execute arbitrary operating-system commands as the upsmon account, which is commonly root. An attacker can control the value through a malicious or compromised upsd, a man-in-the-middle on a plaintext upsd to upsmon connection, or a compromised UPS device whose driver supplies the alarm upstream of upsd; TLS between upsd and upsmon does not mitigate the compromised-device path. This vulnerability is fixed in 2.8.6.","aliases":["GHSA-mjgp-j4gm-6qg5"],"modified":"2026-11-14T07:06:05.088728395Z","published":"2026-11-03T19:57:14.274Z","related":["openSUSE-SU-2026:11367-1"],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-78"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54161.json"},"references":[{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2026/07/01/10"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54161.json"},{"type":"ADVISORY","url":"https://github.com/networkupstools/nut/security/advisories/GHSA-mjgp-j4gm-6qg5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54161"},{"type":"FIX","url":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7"},{"type":"FIX","url":"https://github.com/networkupstools/nut/commit/dffba911504866695be698bb5ec49eac40d0f66a"},{"type":"FIX","url":"https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220"},{"type":"FIX","url":"https://github.com/networkupstools/nut/pull/3499"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/networkupstools/nut","events":[{"introduced":"c0acf09af3be41752abad90a19a11a26c9256b28"},{"fixed":"98e073d4cc31f9c73e2fa0c2677540487d902fe7"},{"fixed":"dffba911504866695be698bb5ec49eac40d0f66a"},{"fixed":"ecf98e7542e4ae2b62b211622ee26989274b2220"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"2.8.3"},{"last_affected":"2.8.5"}],"source":"AFFECTED_FIELD","strategy":"StringRangeExpression"},{"range":[{"fixed":"98e073d4cc31f9c73e2fa0c2677540487d902fe7"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"dffba911504866695be698bb5ec49eac40d0f66a"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"ecf98e7542e4ae2b62b211622ee26989274b2220"}],"source":"REFERENCES_COMMIT"}]}}],"versions":["v2.8.5","v2.8.5-rc8","v2.8.5-rc7","v2.8.5-rc6","v2.8.5-rc5","v2.8.5-rc4","v2.8.5-rc2","v2.8.5-rc1","v2.8.4-rc4","v2.8.4","v2.8.4-rc3","v2.8.4-rc2","v2.8.4-rc1","v2.8.3-rc6","v2.8.3"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54161.json","vanir_signatures":[{"id":"CVE-2026-54161-05bb1788","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"function":"async_notify","file":"clients/upsmon.c"},"deprecated":false,"digest":{"length":993,"function_hash":"100283136533391709915613836486397408081"}},{"source":"https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220","target":{"file":"clients/upsmon.c","function":"wall"},"deprecated":false,"digest":{"function_hash":"313075366980675892645746937177218975437","length":704},"id":"CVE-2026-54161-0afa260b","signature_type":"Function","signature_version":"v1"},{"signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"file":"clients/upssched.c","function":"exec_cmd"},"deprecated":false,"digest":{"function_hash":"249958236224129173233084626940251566217","length":1707},"id":"CVE-2026-54161-1fca06c9","signature_type":"Function"},{"digest":{"line_hashes":["297729355924782690328023340286201744917","195884035059873088114128355246615054746","200616316284746710477953996375612860740","331181013746613651520084323702620579560","289983264881246510405533801624148279222","77289477292354141186831871479577358572","107483001519440204890899716416905245179","212645615043493585874076634706025422251","328887442357941121297051729628922141534","169545943113328174195522672266622602426","151882312275331095502079474416517748221","75630906361340117912445519430893052499","249111928023657954134303663974094434261","2222602451111957555340963893945922373","163968937713325510258640091648920284658","207260473235300317401029669591370872616","38379259955847236187806850789423618297","249737576443618008967395033116394822339","333956417582625015215178877549757312854","278871986785156651176204073576246267041","45570535893973655968671732768258102588","29514272896711702592670047258477379009","114120797036051094838053792691392610092","74104561973817250398288674860324462466","127895688558675374373435304403606604612","42532095595247280690750462504322093194","221807153084268941871541654226055323048","191647717882974438665356804836377783694","232013808429337955673219493699425396458","89365220237485886401766973013376027215","151776873091439863410828846065035074218","151303028907177070800720411660433575194","169705723642671027179702690854231605314","76470391954143720999715068363678883986","96650110820986380520644344667437367857","19565858790866419744679373572865186322","151900375500185061166815336765952089525","232948902311150200193159805259258401258","87323310492715806069369513841705720936","222476986497491936421668025699745977696","21697955632298463316130489323787327798","253628243821432824520222735027551862295","171750414816314404075521856492731782030","218953582323628877879164015399134554910","243640170344081807491006624989459129770","298848298798548184107158642204292595943","51760572133715134932192366170004510344","264873954216557861941822843322616645879","260088072451953225347164389441965430070","163172767557792509012411214084654109271","135718278708625095950047447882366261213","177128689785226287921117461743725330335","301573885850845904643785354978339055091","201947898870739878173311369103823030178","66966394864697208727130080954148816185","214122342826209614713920745881371856435","211214726814785939761786095452031931547","249322233602132878989188156092314878874","283242360381016329391379783301430859551","142754070728729510741576919888045728680"],"threshold":0.9},"id":"CVE-2026-54161-2033e6b1","signature_type":"Line","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220","target":{"file":"clients/upsmon.c"},"deprecated":false},{"digest":{"function_hash":"79051510336608739141968283806923834289","length":15799},"id":"CVE-2026-54161-36a65fcc","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"file":"clients/upsmon.c","function":"main"},"deprecated":false},{"target":{"file":"clients/upsmon.c","function":"doshutdown"},"deprecated":false,"digest":{"function_hash":"151403769732394707192292040638319772479","length":4110},"id":"CVE-2026-54161-4065db18","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7"},{"target":{"function":"notify","file":"clients/upsmon.c"},"deprecated":false,"digest":{"function_hash":"154067443530876277919094963176224471212","length":2231},"id":"CVE-2026-54161-5b38385d","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220"},{"source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"function":"parse_at","file":"clients/upssched.c"},"deprecated":false,"digest":{"length":3081,"function_hash":"280164347122764595374055572951228601286"},"id":"CVE-2026-54161-8e781c3a","signature_type":"Function","signature_version":"v1"},{"target":{"file":"clients/upssched.c"},"deprecated":false,"digest":{"line_hashes":["311022303475180800040804422433528659955","306608619919660905365587698584493348279","84471544087882483668145984010715410717","65396110628436495005866007144417865828","268738057781564256377513832856068311204","328627357551566447008364458949789639028","51572777471944978148981373604480185537","278134290255744366753444458653360396193","268949602125682845792245010727146935178","202758315034015960218181746039392733122","177108324556002419872564663076651550640","228889493396306355438478691712662809782","318414696878680988132064760791153081643","102988095992913938035576505072143509672","186516912975561022222027045499182821075","293474266098669581761490152780330726326","292685741843596911113123304785575141984","155883436357191443947953403585375583913","83515692839133672544277831115683372150","123068852399462438611977030356336285663","152827078482017662755502639006684921149","212747213838596772110434507357905107313","292629724183196095234286135253932686297","3832438759689149766897225547275860872","163207493999709304330273060711334645069","321490185819468745991628050387475885467","96368935143656781375354664411754965558"],"threshold":0.9},"id":"CVE-2026-54161-8ed9dd2d","signature_type":"Line","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220"},{"signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"file":"clients/upsmon.c"},"deprecated":false,"digest":{"line_hashes":["53543662027190637102158672508817959021","314806463211977312648347778454526999491","251675497345167305973254931640852232054","320765730119739725855601339041071604058","228754203587209993081552661561551294237","262032329125621795589406043292890087112","134482559331688889071932663785615178872","190987641314641380950850155457728809490","74104561973817250398288674860324462466","27344187987982319645788405580672074134","44999837661649917448918606011517251979","81006815473673719795124415681637547183","90152385764356692545608332834114622648","123486389052356519428336805734961377930","89365220237485886401766973013376027215","151776873091439863410828846065035074218","291245117432890497752269535652446679864","101745712358862549783484162697579635677","215140041514456898506086695563736696286","308223910650167132774435799477286529036","116266855552508978700345288357128985282","219391759063767777123996564531905113387","135188462464575863659028245076580096476","164016069927968976758104396536067356192","148679327374894297100635453361149802101","316422816922755719048493539265545441774","115853860641622153855641574512130554389","53957526397509202517720751135455070188","110550715060446673421348975368848507793","25564224614228881538482273724329941157","98100310395210133162744037932946887294","285143579142363016961270706268662354400","103189184962798612146325322279452555411","82798487618348297309328991622496522268","312598464143259974687853228940152587481","155978107160631996102306968820309541143","305384384631604433646154174507042198305","4619625738216911673547199018272580638","330346699312918952154449630968025457492","101862040558134787566218607581686337802","178570629191789853950078186967994732587","241608438520882954341512289691260768564","208878565005252874339959090631675032672","294654131305283848924112142138688950354","8738407238638636583012197871349709946","185184058083097915624872911210908794508","37062442327369625237150278297868652524","97821242586534000885901342439276172014","40491211474136044286938692338540015955","8713535369629929493481603734365425115","176216571638033029376867092661208961418","39829711937592158432507725089592337898","129488867892804012499859152382817509554","143057986253216029932263374075621286532","278060992881669011885770693342082884932","176793675091534422709939242021850976467","168304870304932365749392338735038443271","187017210452804555612886323633004714932","283759162266354746365314382666457851367","44410223689022996771929092419338480854","323602092154700790491102968036768881397","97714882211329978577937389233886364442","6221673761281551990189988512531227381","332092479091839669933430988361617540421","220820026928063990185324765371321315579","85333965615657418152667867652983198303","310915105580725576109352449198011568781","243658809827271375704981903570836417345","247646032268924106996788832971155898633","113860430302061357621740452384173567185","272426542113790317386238983138949042431","271195212574097504350751855783517344593","160923952463459039123998752087433233019","98054758488920993642253754461359288838","187220084461054381300694922379796698367","120621109200782984973040922781326952852","11647435648046364454780426116920093425","55741223229694250561826410861639332418","254580205276839497261891706691881175130","261471425746856635372238035736856895701","307415055347514131547531388891837402829","55089885403383738521201785940326194765","206955567429310818748353036830347371297","174783733443845471747318971594689672622","227817008199468501148304055640398659647","297906415585018062011777605667978469362","170582478999546400901156749150228444442","230803204785162478996048861592544256064","267688858549827104183544360109150775942","262868945840847638776979053941324284608","328885584699107759475214568647791182074","125917344766288645875597819067360694616","176095643041549437055510206457855464386","126321112133667579254919923846963931790","141169367238942111740534092025925313195","72893714698780101313489939136405174581","332640235804001805579262074758835048805","114559336202847720197009554464766825396","325734757079519493179776216783078310334","23278964846531812797655214881311091538","296092134685177548004482949855034392071","185941039243878440401439172955357775481","231957263559318803579139532541608847277","97013268786026385876246329796179756455","52513399704718394500159478269019156139","34831588905342678576123746280855054749","300290916611492744140896900740592270540","270463083187386579311637884762507261543","138007398307893441774596433639884420264","250543671684829765562803234175474976599","158409699058810982895792354917052788033","301080032274199375083183277361387650062","30050157119751334029577357007161578589","46317755643544160753420413239080498762","61737548657995535396243483027997918087","252506246865561223711971465539365991347","37553699608110217993399532422898116438","22100402243000446541569491021567483655","205134913734314566335595042408669322762"],"threshold":0.9},"id":"CVE-2026-54161-9005fcc3","signature_type":"Line"},{"target":{"function":"parse_conf_arg","file":"clients/upsmon.c"},"deprecated":false,"digest":{"function_hash":"3998318681579403319658074133220380030","length":5427},"id":"CVE-2026-54161-9af744f0","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7"},{"digest":{"length":1182,"function_hash":"259619547940048817057296781444190041925"},"id":"CVE-2026-54161-9d01478f","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"file":"clients/upssched.c","function":"conf_arg"},"deprecated":false},{"deprecated":false,"digest":{"line_hashes":["162848741679698198401815116048514314890","81064511044588884242942860785627423748","34037726410770464905900193422402889122","116700737831846251812599450407549538817","83340779781673789879381371425584231490","232332868231730160026153974331623439235","237685049433877929322983782821238178776","224162167863245396529835513105944100744","202041206352133772324390361777873146835","208330225279392971741275755823726637365","264731055408560753153495467571294328032","43958085000101654800154054919950824966","205563934464681290873909234346522210431","74981607745426757521998383095600077271","125370091186813290236797910091049168494","216680038286533072747885036253139485529","267276147500212566075722387335892536274","76285543747524862059839796465569975396","70780655055781262989644260137566163764","58242604985341786550908919588843662456","278976268468951884387071381458200954080","325157426807072695935548304450403989225","179449395499947014624788806123249449800","52463033402116771220189975475184229126","214219256260425708060819472885066811073","218419634201043404031812666460978814677","7277373530092364774057594884159738410","257569991607061209719195368941484292310","207467919609147990632918113412805383854","308024681813563568365053155405470085875","169106077171118620259643366445534584868","99751733299472169894990461435476339607","33279361442683279080508418660425035835","225956433247845814452661158714437544880","265819427649615894092017923571703171544","66132015525513354977333733480507173563","111196886702584023027275593655702894942","212198771412091601050869691028413778089","2301897321247885437033837129854004789","52870349668991498383476745217962778217","282681665050412669237478098099611938435","339701369519564643745249236371650322141","167795838235222439610718353708182842224","312731906956584531383174581546633141932","8062785909847674199275565229672451256","228774818067671043649085823161239990592","154940028178301916129948916239057478031","125255070305338736001729378366910348163","12329909159085695174617947930815333770","81593445865506613021440527317363229057","144708645846623757503387635138486310122","217596582015416329316684413951009528737","289248977529859052696277430427717025545","13832476473452332565482578456049791712","319730290608744292420672540330939483925","47189591738954606774940204586444523551","215430137678627917868362541662212652994","297802884864079790393696039695432895121","287563329118863325269034066812385235330","309377940715279254742318255071985232245","11012820937584709792452849748284032427","336021114296720697133586295024340053736","195713242527637951889483270609692101742"],"threshold":0.9},"id":"CVE-2026-54161-a5b73770","signature_type":"Line","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"file":"clients/upssched.c"}},{"signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220","target":{"file":"clients/upssched.c","function":"exec_cmd"},"deprecated":false,"digest":{"function_hash":"320126605568752918780743312546357664501","length":847},"id":"CVE-2026-54161-b16e32a6","signature_type":"Function"},{"id":"CVE-2026-54161-b7e2105a","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"file":"clients/upsmon.c","function":"upsmon_cleanup"},"deprecated":false,"digest":{"length":645,"function_hash":"54135996169330499097533435473039573313"}},{"signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"file":"clients/upsmon.c","function":"runparent"},"deprecated":false,"digest":{"length":2562,"function_hash":"244873301055783491345440646032596563382"},"id":"CVE-2026-54161-c012225a","signature_type":"Function"},{"deprecated":false,"digest":{"length":2348,"function_hash":"166380942584881038399160409920478942197"},"id":"CVE-2026-54161-c15b9dd8","signature_type":"Function","signature_version":"v1","source":"https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7","target":{"function":"notify","file":"clients/upsmon.c"}},{"source":"https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220","target":{"function":"async_notify","file":"clients/upsmon.c"},"deprecated":false,"digest":{"function_hash":"156904035289003878543227171600258931249","length":862},"id":"CVE-2026-54161-eff4dad2","signature_type":"Function","signature_version":"v1"}],"vanir_signatures_modified":"2026-11-14T07:06:05Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}