//nefariousplan

CVE-2024-10441: Synology's synoplugind Ended Multi-line Values With A Text String, And The Pre-Auth Account Field Was A Multi-line Value

vendor

patterns

cve

proof of concept

The NVD description of CVE-2024-10441 reads, in full: "allows remote attackers to execute arbitrary code via unspecified vectors." The vectors were demonstrated on the Pwn2Own Ireland 2024 stage by DEVCORE's Pumpkin Chang and Orange Tsai in late October 2024, patched by Synology in advisory SA-24:20 on November 5 of that year, assigned CVE-2024-10441, and then published to the NVD on March 19, 2025 with the sentence above. CISA added it to the Known Exploited Vulnerabilities catalog on November 18, 2026, two years and twenty-four days after the Pwn2Own demonstration. The federal remediation deadline is today. The vectors are two literal ASCII strings: PLUGIN_VALUE_START and PLUGIN_VALUE_END. The pre-auth account field that SYNO::SDKPluginWebloginPre hands to synoplugind before the password is ever checked is written between them.

synoplugind is a root daemon whose plugin scripts take their environment from a text file

DSM ships a daemon named synoplugind that runs as root and listens on the Unix-domain socket /run/synoplugind/server.sock. Other DSM services, including the web login service SYNO.API.Auth, talk to it through the SDK in libsynosdk.so.7. When a plugin fires, the daemon:

  1. receives a set of KEY=VALUE arguments from the SDK,
  2. writes them to a per-invocation text file,
  3. parses that file back and calls setenv() for each pair,
  4. execs the plugin scripts in /usr/syno/plugin/<name>/ as root with that environment.

The plugin relevant to CVE-2024-10441 is weblogin. Its scripts receive, among others, USER, TYPE, and IS_KNOWN_DEVICE. USER is the attacker-controlled account string posted to the login endpoint.

The text file is line oriented. Single-line values are written flat:

TYPE=login
IS_KNOWN_DEVICE=no

Multi-line values are wrapped between two sentinel strings:

USER=PLUGIN_VALUE_START
first line of value
second line of value
PLUGIN_VALUE_END

Both sentinels are plain ASCII text on a line by themselves. There is no length prefix, no checksum, no quoting, and no escape sequence. The parser on the daemon side reads a line, and if the line equals PLUGIN_VALUE_END, the current value is closed.

The end of a value is a text string

Patch-diffing the pre-fix synoplugind, libsynosdk.so.7, and SYNO.API.Auth.so against the November 2024 build yields one structural change and one validation string. The serializer in the pre-fix SDK writes the attacker's account value verbatim between the two sentinels. It does not scan the value for the closing sentinel. It does not call any encoding function. It calls, in effect:

fprintf(fp, "%s=PLUGIN_VALUE_START\n%s\nPLUGIN_VALUE_END\n", key, value);

If value happens to contain a line whose exact contents are PLUGIN_VALUE_END, the parser on the daemon side closes the current value early, treats every subsequent line up to the real PLUGIN_VALUE_END as a new top-level KEY=VALUE pair, and setenvs each one into the environment of the root plugin script.

This is CWE-116, Improper Encoding or Escaping of Output, in its purest form. The author of the serializer chose a sentinel out of the attacker's alphabet and then did not bother to forbid it on the way in. There is no character to escape. PLUGIN_VALUE_END is seventeen ASCII letters and an underscore. Every one of them is legal in an HTTP POST body. The content-is-command pattern is literal here: the attacker's content, read back line by line, becomes a command to the parser to end a value and start parsing new keys.

The function name says Pre, and Pre means pre-auth

The entry point lives in SYNO.API.Auth.so. Demangled, its C++ symbol is:

SYNO::SDKPluginWebloginPre(const std::string& account,
                           const std::string& device,
                           bool)

The mangled form, for anyone reaching in with dlsym, is _ZN4SYNO20SDKPluginWebloginPreERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_b.

The Pre suffix is not stylistic. WebloginPre fires on the pre-authentication branch of the login state machine, before the password is checked, as the plugin framework's first-opportunity hook for other services to observe or shape the login. It takes the raw account field from the request, hands it to SLIBPluginSetArg(ctx, "USER", account, 0, 0) with no filtering, and asks the SDK to fire SLIBPluginAction(PRE, ctx). The SDK then writes the file above and signals the daemon. The daemon, running as root, reads the file and setenvs. No credential check has occurred yet.

That is why CVE-2024-10441 is CVSS 9.8, AV:N, AC:L, PR:N, UI:N. Nothing in the chain between an unauthenticated HTTP request and execve of a root shell script with an attacker-controlled environment ever looks at the password.

The injection is four lines

The payload that turns this parsing error into a root shell has to do two things: close the USER block early so that a chosen key is parsed as a top-level pair, then reopen a benign block so that the trailing PLUGIN_VALUE_END the serializer always writes still has a value to belong to.

The four line structure, placed in account:

x
PLUGIN_VALUE_END
LD_PRELOAD=/evil.so
ZZ=PLUGIN_VALUE_START
z

When synoplugind serializes and reparses this, the environment handed to /bin/sh /usr/syno/plugin/weblogin/*.sh --pre is:

USER=x
LD_PRELOAD=/evil.so
ZZ=z
TYPE=login
IS_KNOWN_DEVICE=no

Line two closes USER early. Line three is parsed as a brand new top-level environment variable. Line four opens a new block ZZ so that the closing PLUGIN_VALUE_END the serializer will append at the end of the file is consumed legally. Without line four, the trailing sentinel is orphaned, the daemon rejects the batch with a Bad env key value log line, and no setenv happens. The ZZ reopener is not optional; it is the frame around the attacker's own frame break.

Over HTTP the delivery is a GET against the login endpoint with newlines URL-encoded as %0A:

GET /webapi/entry.cgi?api=SYNO.API.Auth&version=7&method=login&session=webui&format=sid&passwd=x&account=x%0APLUGIN_VALUE_END%0ALD_PRELOAD=%2Fevil.so%0AZZ=PLUGIN_VALUE_START%0Az HTTP/1.1
Host: nas.example:5001

The %0A is mandatory. A raw newline in the request line malforms the HTTP, which is where the misleading HTTP 400 responses in some public write-ups come from; the server rejects the request before SYNO.API.Auth ever sees it. URL-decoded, the server stores account as a five-line string and feeds it to SDKPluginWebloginPre.

Dropping /evil.so on the box in the first place is out of scope for this chain; Pwn2Own entries typically pair this primitive with a separate arbitrary-write or authenticated-upload primitive to stage the shared object. Once the object is on disk at a path readable by root, the loader's constructor runs as root at the first exec the plugin triggers, and the Pumpkin Chang / Orange Tsai PoC's constructor demonstrates uid=0(root) gid=0(root).

The constructor has to disarm itself

A shared object loaded by LD_PRELOAD into a shell is inherited by every fork/exec the shell performs. A plugin shell script that calls system or popen will fork a new /bin/sh, which will re-load the same shared object, whose constructor will fork again, and so on. The reference PoC's constructor does three things in order before running any payload:

  1. unsetenv("LD_PRELOAD") as its first statement,
  2. open("/tmp/.pwn_once", O_CREAT|O_EXCL|O_WRONLY, 0600) as a one-shot guard; if the open fails with EEXIST the constructor returns silently,
  3. only then does it run its demonstration (write to /out.txt, execl("/usr/bin/id", ...), etc.).

This is a detail that matters in post-hoc forensics: an attacker who got the guard wrong leaves a fork-bomb signature in dmesg and in whatever process accounting is enabled, while an attacker who got it right leaves one /tmp/.pwn_once file and whatever their constructor explicitly logged.

The fix is Base64, not an escape function

The patched SDK in the November 5, 2024 build no longer writes the attacker's string between text sentinels at all. It calls SLIBCBase64Encode on the value before serialization, and the daemon side calls SLIBCBase64Decode after parsing. The sentinel strings are still there in the format, but the bytes between them are now constrained to the Base64 alphabet, which does not contain the _ character that PLUGIN_VALUE_END needs. The daemon additionally rejects values that do not decode cleanly, logging Bad env key value, which is the string that shows up new in the binary diff.

This is the structural reason the vendor did not ship an escape function. There is no sequence of printable ASCII characters that is both reserved by the plugin environment file format and illegal in a login account field, so there is no character for a pre-serialization filter to strip. The only moves are to change the alphabet of the value (Base64, hex, length-prefixed binary) or to pick a sentinel that cannot appear in the input alphabet (a NUL byte, for example, which Synology did not choose). The patch chose Base64. The format was the bug, and the fix replaced the format.

The author of the pre-fix serializer was making the closed-network-assumed trade: synoplugind listens on a Unix-domain socket that only root-group processes can open, so the author treated the SDK's input as already trusted. Every byte that reaches the socket arrives from inside DSM. What the author did not account for is that SYNO.API.Auth, running on the far side of an unauthenticated HTTP endpoint, is also inside DSM, and the string the attacker types on the login page is the same string the SDK serializes. The IPC boundary was trusted; the HTTP boundary above it was not held to the same standard.

What the advisory names and what NVD does not

Synology's SA-24:20 names the researchers (Pumpkin Chang and Orange Tsai of DEVCORE; Ryan Emmons; Team Smoking Barrels), cites ZDI-CAN-25403, and lists the fixed versions:

Branch Fixed in
DSM 7.2.2 7.2.2-72806-1
DSM 7.2.1 7.2.1-69057-6
DSM 7.2 7.2-64570-4
DSM 7.1.1 7.1.1-42962-7
DSM 6.2.4 6.2.4-25556-8
BeeStation OS 1.1-65374
DSMUC 3.1.4-23079

CISA's KEV entry, added November 18, 2026, lists the CVE as "Synology DiskStation Manager (DSM) Improper Encoding or Escaping of Output Vulnerability," ties the remediation deadline to today, November 21, 2026, and marks the "Known Ransomware Use" column as Unknown. The NVD record, published March 19, 2025 and unmodified since, still describes the vectors as "unspecified."

The three-day KEV window is the shortest CISA ever issues and the catalog's way of saying that the vulnerability's technical details, its PoC, and its fix are all more than a year old at the point of KEV listing. The agency's model is not that the vulnerability is novel. The agency's model is that the agencies running DSM on federal networks have had since November 2024 to patch and have not.

Two years and twenty-four days is how long a pre-auth, CVSS 9.8, Pwn2Own-demonstrated bug with a documented four-line injection payload sits on the NVD as "unspecified vectors" before the catalog of last resort catches it. The vectors have been specified in this post, from the symbol name down to the Base64 alphabet, because PLUGIN_VALUE_END is not an unspecified vector. It is eighteen ASCII characters.

The fix did not escape PLUGIN_VALUE_END. The fix replaced the text format that let PLUGIN_VALUE_END appear as data in the first place, and twenty-four months after Pwn2Own the CVE record NVD serves still calls the vectors unspecified.