
CVE-2026-39127 - pre-auth RCE on the Minions Bob router
A stack buffer overflow in the login handler of dvmsvr on the Davolink Minions Bob (DVW-642) router enables an unauthenticated, remote attacker to execute arbitrary code as root. Exploitable via a single HTTP req to /auth/login.
User creds are encrypted locally before being sent. The key + IV come from a pre-auth endpoint (GET /client/info), so anyone can fetch them and encrypt their own payload.
Hex-encoding the ciphertext makes the enc body [0-9a-f] - note /auth/login ensures this with the dvmsvr!check_xss_cmd filter. The real bytes appear only after the server hex-decodes it, and since that happens before decryption, no key is needed O.o
dvmsvr serves the device's web panel. The pre-auth /auth/login handler
(post_auth_login_callback) takes the JSON enc field, copies it into a stack
buffer, and hex-decodes it into a 64 byte stack buffer (again, b4 decryption):
char hex_str[256];
char ciphertext[64];
...
snprintf(hex_str, 0x100, "%s", json_at_string(json_root, "enc")); // up to 255 chars
hex_len = strlen(hex_str);
hexstring_to_hex(hex_str, hex_len, ciphertext); // 255 hex chars -> 127 bytes (!!)
plaintext = aes_decrypt_random_key(ciphertext, &short_hex_len);
255 hex chars decode to 127 bytes into the 64-byte buffer, overwriting the saved frame pointer and return address:
decoded byte content
0 .. 63 filler (fills ciphertext[64])
64 .. 67 saved $fp
68 .. 71 saved $ra
It's just our luck that dvmsvr has no mitigations (no canaries, PIE, NX, or RELRO) and loads at a fixed addr, so we can ret straight into native code (ret2text).
With a fixed .text, we return into a system() wrapper at 0x40e8c4. The function dvmsvr!dvs_call ends up computing $a0 = $fp + 0x20 and calls system. Control over $fp gives us control over the command :)

Set $ra to the gadget and point $fp + 0x20 at a string we control. .rodata:0x462260 contains "sleep 2 && reboot &", so $fp = 0x462240 and $ra = 0x40e8c4 reboots the box w/ one request.
A chosen command needs our own string at a known address; we have plenty of room left over in our buffer, but randomize_va_space = 1 randomizes the stack, so (w/o a leak) we can't predict where our input lands in memory.

The heap is not randomized; no PIE keeps it fixed at 0x47c000 (RWX), and akheron/jansson places the enc string there predictably. We append "cmd ; cmd ; ..." to the request past the overflow bytes. dvmsvr!hexstring_to_hex decodes only the leading hex, so the rest stays on the heap, and we aim $fp + 0x20 at it. The ; acts as a sort of interpreter sled, so libc!system runs wherever it lands (regardless of offset).
dvmsvr!post_auth_login_callback
├── dvmsvr!check_xss_cmd
├── jansson!json_loadb
│ └── dvmsvr!json_at_string("enc")
├── libc!snprintf(hex_str[256])
├── libc!strlen
├── dvmsvr!hexstring_to_hex
│ └── overwrites saved $fp + $ra
├── dvmsvr!aes_decrypt_random_key
└── dvmsvr!dvs_call+0x7C
└── libc!system($fp + 0x20)
├── 0x462240 "sleep 2 && reboot &"
└── heap spray @ 0x47c000
boboverflow.py (deps: pwntools):
python3 boboverflow.py 172.20.1.1 # bind shell: telnetd on p1337
python3 boboverflow.py 172.20.1.1 'id; reboot' # run an arbitrary command
conn pointer) must be 0: the epilogue dereferences it before returning, so a non-null value crashes b4 our return address is restored0x4a3000 - 0x4a8c49. The PoC aims $fp + 0x20 from the center (~0x4a6000) outward, hitting the most likely offset first and re-sending after each respawn