Skip to content
Memory corruption Advisory Advanced CVE-2021-21971

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.

Francesco Benvenuto Follow

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.

Francesco Benvenuto and Matt Wiseman, on Cisco Talos

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

  1. Connect to the device's MQTT command channel (or intercept it via man-in-the-middle).
  2. Send a specially crafted 'u-download' MQTT message with a URI containing a '%' at the end of the password or filepath field.
  3. The device parses the URI and calls URL_decode on the username and password fields.
  4. 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.

More by Francesco Benvenuto

View all

9 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.