Sealevel Systems, Inc. SeaConnect 370W URL_decode out-of-bounds write vulnerability
The URL_decode function in the SeaConnect 370W firmware update process does not properly handle a percent sign at the end of a string, leading to an out-of-bounds write. An attacker who can intercept MQTT traffic could send a crafted message to overwrite memory and potentially alter the device's behaviour.
Originally disclosed on Cisco Talos
An out-of-bounds write vulnerability exists in the URLdecode functionality of Sealevel Systems, Inc. SeaConnect 370W v1.3.34.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The URL_decode function assumes that a '%' character is always followed by two more characters, so when '%' is at the end of the string it reads past the null terminator and copies memory beyond the intended buffer.
Impact
An attacker who can perform a man-in-the-middle attack could trigger an out-of-bounds write, potentially leading to memory corruption and limited integrity impact.
What the attacker needed
Man-in-the-middle position on MQTT traffic
How it was found
- Connect to the device's MQTT command channel (or intercept it via man-in-the-middle).
- Send a specially crafted 'u-download' MQTT message with a URI containing a '%' at the end of the password or filepath field.
- The device parses the URI and calls URL_decode on the username and password fields.
- The URL_decode function reads past the null terminator and performs an out-of-bounds write, overwriting adjacent memory.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The device downloads firmware updates over a network connection. When it processes the address of the update file, it decodes special characters like '%'. If the address ends with '%', the decoding goes wrong and writes data past the end of a buffer, which can corrupt other memory. An attacker who can intercept the network traffic could exploit this to change how the device behaves.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.