{"id":48949,"date":"2026-09-02T16:48:49","date_gmt":"2026-09-02T11:18:49","guid":{"rendered":"https:\/\/www.getastra.com\/blog\/?p=48949"},"modified":"2026-09-02T16:48:52","modified_gmt":"2026-09-02T11:18:52","slug":"cve-2026-49481","status":"publish","type":"post","link":"https:\/\/www.getastra.com\/blog\/vulnerability\/cve-2026-49481\/","title":{"rendered":"CVE-2026-49481: Vulnerability in UpSnap"},"content":{"rendered":"<div class=\"gb-container gb-container-83f53fef\">\n\n<p class=\"wp-block-paragraph\"><strong>Product Name:<\/strong> Package UpSnap<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Vulnerability:<\/strong>&nbsp; Authenticated Remote Code Execution in UpSnap<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Vulnerable Version:<\/strong>&lt;= 5.3.5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>CVE:<\/strong>&nbsp;<a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/cve-2026-49481\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/nvd.nist.gov\/vuln\/detail\/cve-2026-49481\" rel=\"noreferrer noopener\">CVE-2026-49481<\/a><\/p>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">On 26\/05\/2026, a security researcher at Astra Security found a critical Remote Code Execution (RCE) vulnerability in UpSnap, a web-based wake-on-LAN(WoL).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The root cause is an OS Command Injection vulnerability(CWE-78) that exists in UpSnap\u2019s device management functionality due to unsafe template interpolation of the IP and MAC fields. These templates are then executed via the system shell (\/bin\/sh -c on Linux or cmd \/C on Windows) without sanitization, escaping, or proper validation of dangerous characters (&amp; ; | $() `).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This results in an authenticated Remote Code Execution (RCE) vulnerability, allowing any low-privileged user with permission to create or edit devices to execute arbitrary operating system commands on the UpSnap server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Technical_Breakdown_of_CVE-2026-49481\"><\/span>Technical Breakdown of CVE-2026-49481<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">CVE-2026-49481 was discovered during a manual security review of the device management and command execution functionality in UpSnap. This flaw allows authenticated attackers to achieve arbitrary remote code execution by injecting shell metacharacters into the IP or MAC fields, which are then interpreted by the shell when a Wake or Shutdown operation is triggered.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How was CVE-2026-49481 discovered?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While reviewing the source code (specifically backend\/networking\/wake.go and shutdown.go), our researcher noticed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wake_cmd := device.GetString(\"wake_cmd\")\n\nwake_cmd = strings.ReplaceAll(wake_cmd, \"{{ DEVICE_IP }}\", device.GetString(\"ip\"))\n\n\/\/ ... similar for MAC\n\ncmd := exec.CommandContext(ctx, shell, shell_arg, wake_cmd)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To confirm the vulnerability was exploitable, the researcher set up a test device with a malicious IP address and a custom wake command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Wake Command: {{ DEVICE_IP }} (minimal test)\n\nIP Field: cmd.exe \/c whoami &gt; C:\\Users\\Public\\rce_ip.txt (on Windows)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When the Wake button was clicked, UpSnap executed the injected command through the shell, successfully writing the output of whoami to the specified file.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Further tests with payloads like &amp; calc.exe, etc., confirmed reliable command injection. This process revealed a clear OS Command Injection vulnerability (CWE-78), leading to the responsible disclosure and this advisory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to replicate the vulnerability CVE-2026-49481<\/h3>\n\n\n<div class=\"gb-container gb-container-f7da1b01\">\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisites<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A running instance of UpSnap <strong>\u2264 5.3.5<\/strong> (Docker or direct install).<\/li>\n\n\n\n<li>Valid credentials for an account that can create\/edit devices (authenticated access required).<\/li>\n\n\n\n<li>Network access to the UpSnap web interface.<\/li>\n<\/ol>\n\n<\/div>\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to the UpSnap web dashboard.<\/li>\n\n\n\n<li>Create or edit a device:<\/li>\n\n\n\n<li>Go to the Devices section.<\/li>\n\n\n\n<li>Add a new device with the following values (example for Windows target using calc.exe):<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Name: test-device\n\nIP: 127.0.0.1 &amp; calc.exe \u2190 Injection point\n\nMAC: 00:11:22:33:44:55 (any valid-looking MAC)\n\nNetmask: 255.255.255.0\n\nOther fields as needed.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">5. In the device settings or global settings, set the Wake command to something like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ping -n 1 {{ DEVICE_IP }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">6. Click the Wake button for the device<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">7. On a Windows host running UpSnap, calc.exe should launch.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">8. The calc.exe application launches successfully, confirming RCE.<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\"><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Alternative minimal test (even stronger injection):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set Wake command to just {{ DEVICE_IP }}\n\nSet IP to cmd.exe \/c whoami &gt; C:\\Users\\Public\\rce.txt (Windows) or equivalent on Linux.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Impact_of_CVE-2026-49481\"><\/span>Impact&nbsp;of CVE-2026-49481<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A critical Remote Code Execution (RCE) vulnerability in UpSnap versions \u2264 5.3.5 allows authenticated attackers to achieve full server compromise by injecting arbitrary operating system commands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The flaw resides in the template substitution logic within the wake and shutdown command execution paths (primarily backend\/networking\/wake.go and shutdown.go).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>The vulnerability could lead to&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Full arbitrary command execution on the server as the user running UpSnap<\/li>\n\n\n\n<li>Complete server compromise, including installation of persistent backdoors or miners<\/li>\n\n\n\n<li>Reading sensitive files (configuration files, environment variables, databases)<\/li>\n\n\n\n<li>Exfiltration of stored device credentials and network information<\/li>\n\n\n\n<li>Lateral movement to other systems on the internal network<\/li>\n\n\n\n<li>Use of the compromised server as a pivot point for further attacks<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Current_Status_of_CVE-2026-49481\"><\/span>Current Status of CVE-2026-49481<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The issue was responsibly disclosed to the project maintainer. This issue can be tracked under GitHub Advisory <strong>GHSA-6mc7-6948-w5h4.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Can_You_Do\"><\/span>What Can You Do?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Users are strongly advised to update UpSnap to 5.4.0 or later immediately to mitigate this CVE-2026-49481. If it\u2019s not possible due to compatibility issues, implement the following workarounds:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Strictly validate\/sanitize IP and MAC inputs.<\/li>\n\n\n\n<li>Avoid using custom command templates with device fields.<\/li>\n\n\n\n<li>Use exec.Command with separate arguments instead of shell strings<\/li>\n\n\n\n<li>Run UpSnap with minimal privileges (dedicated low-priv user\/container).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, Astra Security helps you test for this vulnerability during a <a href=\"https:\/\/www.getastra.com\/pentesting\/web-app\" target=\"_blank\" rel=\"noreferrer noopener\">manual pentest.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Product Name: Package UpSnap Vulnerability:&nbsp; Authenticated Remote Code Execution in UpSnap Vulnerable Version:&lt;= 5.3.5 CVE:&nbsp;CVE-2026-49481 On 26\/05\/2026, a security researcher at Astra Security found a critical Remote Code Execution (RCE) vulnerability in UpSnap, a web-based wake-on-LAN(WoL).&nbsp; The root cause is an OS Command Injection vulnerability(CWE-78) that exists in UpSnap\u2019s device management functionality due to unsafe &#8230; <a title=\"CVE-2026-49481: Vulnerability in UpSnap\" class=\"read-more\" href=\"https:\/\/www.getastra.com\/blog\/vulnerability\/cve-2026-49481\/\" aria-label=\"Read more about CVE-2026-49481: Vulnerability in UpSnap\">Read more<\/a><\/p>\n","protected":false},"author":138,"featured_media":48951,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[723],"tags":[],"class_list":["post-48949","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts\/48949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/users\/138"}],"replies":[{"embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/comments?post=48949"}],"version-history":[{"count":2,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts\/48949\/revisions"}],"predecessor-version":[{"id":48952,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts\/48949\/revisions\/48952"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/media\/48951"}],"wp:attachment":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/media?parent=48949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/categories?post=48949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/tags?post=48949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}