Roundcube — 3 vulnerability checks

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

← All products · Feeds on GitHub

Roundcube Webmail PHP Object Deserialization RCE

CVECVE-2025-49113
Severitycritical · CVSS 9.9
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/roundcube/CVE-2025-49113.yaml

Reports Roundcube Webmail versions affected by CVE-2025-49113 (before 1.5.10, and 1.6.x before 1.6.11): an authenticated user can pass a serialized PHP object in the _from parameter of the settings upload action and get code executed on the server. The check reads the version Roundcube publishes on its login page (the rcversion value of the page's JavaScript environment, present since 1.4) or, for releases before 1.4, the first release heading of the CHANGELOG file, in the web root and in the /roundcube, /webmail and /roundcubemail directories. It is a version check: no payload is sent and no login is attempted.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/?_task=login
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET {{dir}}/CHANGELOG
  4. Parses / computes the next value with a Rhai script
  5. Checks verdict.vulnerable for ^true$ → finding QoD 70: Roundcube Webmail … (from …) is in the range affected by CVE-2025-49113 (before 1.5.10, 1.6.0–1.6.10)

References:

Feed source — tests/vulnerabilities/roundcube/CVE-2025-49113.yaml
# Roundcube Webmail PHP Object Deserialization RCE — CVE-2025-49113
#
# Roundcube < 1.5.10 and 1.6.x < 1.6.11 passes the _from URL parameter in
# the settings/upload action to unserialize() without validation. A crafted
# Crypt_GPG_Engine payload triggers proc_open() RCE on instantiation.
# Exploitation requires an authenticated session (low-privilege user), so the
# feed does not exploit it.
#
# DETECTION (version, QoD 70): Roundcube 1.4+ prints its version in the login
# page's JS env as a 5-digit JSON number, `rcmail.set_env({..."rcversion":10610,...})`
# = major*10000 + minor*100 + patch (rcmail_output_html.php; checked on the real
# roundcube/roundcubemail:<ver>-apache images, #2612 — the previous pattern
# expected a 4-digit value real Roundcube never sends). 1.0–1.3 expose no version
# in pages: the feed then reads the first "RELEASE x.y.z" heading of <dir>/CHANGELOG
# (the stock .htaccess blocks it on Apache; nginx installs serve it); 0.x
# releases use the same heading. One pass per
# common install directory, stopping at the first finding.
uid: 00561531-6965-4200-ba13-473e55469b3a
name: "Roundcube Webmail PHP Object Deserialization RCE (CVE-2025-49113)"
description: |
  Reports Roundcube Webmail versions affected by CVE-2025-49113 (before 1.5.10,
  and 1.6.x before 1.6.11): an authenticated user can pass a serialized PHP object
  in the _from parameter of the settings upload action and get code executed on the
  server. The check reads the version Roundcube publishes on its login page (the
  rcversion value of the page's JavaScript environment, present since 1.4) or, for
  releases before 1.4, the first release heading of the CHANGELOG file, in the web root
  and in the /roundcube, /webmail and /roundcubemail directories. It is a version
  check: no payload is sent and no login is attempted.
cves: [CVE-2025-49113]
cvss: 9.9
severity: critical
category: rce
confidence_base: 0.30
tags: [roundcube, php, deserialization, rce, webmail, kev]
services: [http, https]
author: noctis
version: "1.1.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2025-49113"
  - "https://roundcube.net/news/2025/06/01/security-updates-1.6.11-and-1.5.10"
  - "https://fearsoff.org/research/roundcube"
  - "https://github.com/fearsoff-org/CVE-2025-49113"

steps:
  # ── One pass per install directory; `stop: true` ends at the first finding ─
  - id: reset-login
    action: set_var
    var_name: login
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/roundcube", "/webmail", "/roundcubemail"]

  - id: reset-changelog
    action: set_var
    var_name: chlog
    var_value: {status: 0, body: ""}

  - id: fetch-login
    action: http_request
    method: GET
    path: "{{dir}}/?_task=login"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: true
    timeout_secs: 10
    store_as: login

  # 1.4+: "rcversion":NNNNN inside rcmail.set_env({...}) of the login page.
  - id: read-rcversion
    action: script
    store_as: rcv
    code: |
      let lb = if login.status == 200 && type_of(login.body) == "string" { login.body } else { "" };
      let m = eregmatch("rcmail\\.set_env\\(\\{[^\\n]*\"rcversion\":([1-9][0-9]{4})[,}]", lb);
      if m.len() > 1 { int(m[1]) } else { 0 }

  # 1.0–1.3 (no rcversion): the CHANGELOG's first release heading.
  - id: fetch-changelog
    action: http_request
    method: GET
    path: "{{dir}}/CHANGELOG"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "rcv == 0"
    store_as: chlog

  - id: version-verdict
    action: script
    store_as: verdict
    code: |
      let n = rcv;
      let src = "rcversion " + rcv.to_string() + " in " + dir + "/?_task=login";
      if n == 0 {
        src = "";
        let cb = if chlog.status == 200 && type_of(chlog.body) == "string" { chlog.body } else { "" };
        let c = eregmatch("^CHANGELOG Roundcube Webmail\\r?\\n=+\\r?\\n\\r?\\nRELEASE ([0-9]+)\\.([0-9]+)\\.([0-9]+)\\r?\\n", cb);
        if c.len() > 3 {
          n = int(c[1]) * 10000 + int(c[2]) * 100 + int(c[3]);
          src = dir + "/CHANGELOG";
        }
      }
      let ver = if n > 0 { (n / 10000).to_string() + "." + ((n / 100) % 100).to_string() + "." + (n % 100).to_string() } else { "" };
      // NVD: before 1.5.10, and 1.6.0 to 1.6.10
      let vuln = n > 0 && (n < 10510 || (n >= 10600 && n < 10611));
      #{ vulnerable: vuln, version: ver, source: src }

  - id: report
    action: match
    source: verdict.vulnerable
    pattern: "^true$"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "Roundcube Webmail {{verdict.version}} (from {{verdict.source}}) is in the range affected by CVE-2025-49113 (before 1.5.10, 1.6.0–1.6.10)"
      stop: true

Roundcube Webmail installer enabled on a version with im_convert_path command injection

CVECVE-2020-12641
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/roundcube/CVE-2020-12641.yaml

Detects Roundcube Webmail installations affected by CVE-2020-12641 (1.2.x before 1.2.10, 1.3.x before 1.3.11, 1.4.x before 1.4.4) whose web installer is still enabled, which lets an unauthenticated attacker set the ImageMagick path options that rcube_image passes unescaped to a shell. The check reads the installer's environment-check page (installer/index.php?_step=1) and requires the enabled installer's own page structure, then reads the version from the login page's rcversion value or, failing that, from the CHANGELOG release heading. Both conditions are confirmed from text the product renders. No configuration is submitted and nothing is written on the target.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/installer/index.php?_step=1
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET {{dir}}/?_task=login
  4. HTTP(S) request GET {{dir}}/CHANGELOG
  5. Parses / computes the next value with a Rhai script
  6. Checks verdict.vulnerable for ^true$ → finding QoD 70: Roundcube installer enabled on a version vulnerable to im_convert_path command injection (CVE-2020-12641)

References:

Feed source — tests/vulnerabilities/roundcube/CVE-2020-12641.yaml
# Roundcube Webmail — Command Injection via im_convert_path / im_identify_path (CVE-2020-12641)
#
# rcube_image (program/lib/Roundcube/rcube_image.php) interpolates the
# `im_convert_path` / `im_identify_path` settings unescaped into a shell command
# (fixed in 1.2.10 / 1.3.11 / 1.4.4 by wrapping them in escapeshellcmd()). An
# unauthenticated attacker controls those settings when the web installer is
# still enabled: installer/index.php?_step=2 with `submit` rebuilds the whole
# config from the POSTed `_<option>` fields and writes it to
# config/config.inc.php (rcmail_install::create_config / save_configfile).
#
# DETECTION (non-destructive, QoD 70): the only in-band way to make Roundcube run
# the injected path is to overwrite the live configuration, which this feed never
# does. It instead proves the two preconditions with text only the product
# renders — nothing the request carries is matched (#2368: the previous version
# POSTed a nonce to `_step=3` and matched its reflection, which fired on any
# echo server; real Roundcube never reflects those fields at that step):
#   1. GET <dir>/installer/index.php?_step=1 (read-only environment check) shows
#      the enabled installer: its <title>, the step list (<ol id="progress">) and
#      not the "The installer is disabled!" page.
#   2. The version is affected (NVD: 1.2.0–1.2.9, 1.3.0–1.3.10, 1.4.0–1.4.3),
#      read from the login page's `"rcversion":MMmmpp` env value (1.4+), or from
#      the first "RELEASE x.y.z" heading of <dir>/CHANGELOG (1.2/1.3 expose no
#      version in pages; the stock .htaccess may block CHANGELOG).
# An enabled installer on a fixed or unknown version, or an affected version with
# the installer disabled/removed, is not reported.
uid: 46720552-16cd-4116-8ced-e2966083cb2d
name: "Roundcube Webmail installer enabled on a version with im_convert_path command injection (CVE-2020-12641)"
description: |
  Detects Roundcube Webmail installations affected by CVE-2020-12641 (1.2.x before
  1.2.10, 1.3.x before 1.3.11, 1.4.x before 1.4.4) whose web installer is still
  enabled, which lets an unauthenticated attacker set the ImageMagick path options
  that rcube_image passes unescaped to a shell. The check reads the installer's
  environment-check page (installer/index.php?_step=1) and requires the enabled
  installer's own page structure, then reads the version from the login page's
  rcversion value or, failing that, from the CHANGELOG release heading. Both
  conditions are confirmed from text the product renders. No configuration is
  submitted and nothing is written on the target.
cves: [CVE-2020-12641]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [roundcube, webmail, installer, command-injection, rce, kev]
services: [http, https]
author: noctis
version: "1.1.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2020-12641"
  - "https://github.com/mbadanoiu/CVE-2020-12641"
  - "https://github.com/roundcube/roundcubemail/releases/tag/1.4.4"

steps:
  # ── One pass per install directory; `stop: true` ends at the first finding ─
  - id: reset-installer
    action: set_var
    var_name: inst
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/roundcube", "/webmail", "/roundcubemail"]

  - id: reset-login
    action: set_var
    var_name: login
    var_value: {status: 0, body: ""}

  - id: reset-changelog
    action: set_var
    var_name: chlog
    var_value: {status: 0, body: ""}

  # Step 1 of the installer only runs environment checks (read-only).
  - id: fetch-installer
    action: http_request
    method: GET
    path: "{{dir}}/installer/index.php?_step=1"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: inst

  - id: installer-state
    action: script
    store_as: open
    code: |
      let b = if type_of(inst.body) == "string" { inst.body } else { "" };
      inst.status == 200
        && b.contains("<title>Roundcube Webmail Installer</title>")
        && b.contains("<ol id=\"progress\">")
        && !b.contains("The installer is disabled!")

  - id: fetch-login
    action: http_request
    method: GET
    path: "{{dir}}/?_task=login"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "open == true"
    store_as: login

  - id: fetch-changelog
    action: http_request
    method: GET
    path: "{{dir}}/CHANGELOG"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "open == true"
    store_as: chlog

  # Version from rcversion (1.4+: major*10000 + minor*100 + patch), else from
  # the CHANGELOG's first release heading; then the NVD affected ranges.
  - id: version-verdict
    action: script
    store_as: verdict
    code: |
      let ver = "";
      let src = "";
      if open == true {
        let lb = if login.status == 200 && type_of(login.body) == "string" { login.body } else { "" };
        let m = eregmatch("\"rcversion\":([1-9][0-9]{4})[,}]", lb);
        if m.len() > 1 {
          let n = int(m[1]);
          ver = (n / 10000).to_string() + "." + ((n / 100) % 100).to_string() + "." + (n % 100).to_string();
          src = "rcversion in " + dir + "/?_task=login";
        } else {
          let cb = if chlog.status == 200 && type_of(chlog.body) == "string" { chlog.body } else { "" };
          let c = eregmatch("^CHANGELOG Roundcube Webmail\\r?\\n=+\\r?\\n\\r?\\nRELEASE ([0-9]+\\.[0-9]+\\.[0-9]+)\\r?\\n", cb);
          if c.len() > 1 {
            ver = c[1];
            src = dir + "/CHANGELOG";
          }
        }
      }
      let vuln = ver != "" && ereg("^(1\\.2\\.[0-9]|1\\.3\\.([0-9]|10)|1\\.4\\.[0-3])$", ver);
      #{ vulnerable: vuln, version: ver, source: src }

  - id: report
    action: match
    source: verdict.vulnerable
    pattern: "^true$"
    on_match:
      finding:
        title: "Roundcube installer enabled on a version vulnerable to im_convert_path command injection (CVE-2020-12641)"
        description: "The Roundcube web installer is enabled and reachable without authentication, and the installed version passes the im_convert_path / im_identify_path settings unescaped to a shell. Through the installer an attacker can write these settings into the configuration and get commands executed by the web server."
        remediation: "Upgrade Roundcube Webmail to 1.4.4, 1.3.11, 1.2.10 or later, and disable the installer (set enable_installer to false and remove the installer/ directory)."
        confidence_delta: 0.45
        qod: 70
        evidence: "Enabled Roundcube installer at {{dir}}/installer/index.php?_step=1 (HTTP {{inst.status}}); version {{verdict.version}} from {{verdict.source}} is in the affected range (1.2.0–1.2.9, 1.3.0–1.3.10, 1.4.0–1.4.3)"
      stop: true

Roundcube Webmail persistent XSS via crafted links in plain-text messages

CVECVE-2023-43770
Severitymedium · CVSS 6.1
Categoryxss — XSS
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/roundcube/CVE-2023-43770.yaml

Reports Roundcube Webmail versions affected by CVE-2023-43770 (before 1.4.14, 1.5.x before 1.5.4, and 1.6.x before 1.6.3): a crafted link in a plain-text e-mail breaks out of the link markup Roundcube generates and runs script in the recipient's webmail session when the message is opened. The check reads the version Roundcube publishes on its login page (the rcversion value of the page's JavaScript environment, present since 1.4) or, for releases before 1.4, the first release heading of the CHANGELOG file, in the web root and in the /roundcube, /webmail and /roundcubemail directories. It is a version check: no payload is sent and no login is attempted.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/?_task=login
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET {{dir}}/CHANGELOG
  4. Parses / computes the next value with a Rhai script
  5. Checks verdict.vulnerable for ^true$ → finding QoD 70: Roundcube Webmail … (from …) is in the range affected by CVE-2023-43770 (before 1.4.14, 1.5.0–1.5.3, 1.6.0–1.6.2)

References:

Feed source — tests/vulnerabilities/roundcube/CVE-2023-43770.yaml
# Roundcube Webmail persistent XSS via crafted links in text/plain messages — CVE-2023-43770
#
# rcube_string_replacer (program/lib/Roundcube/rcube_string_replacer.php) lets a
# crafted link in a text/plain e-mail break out of the generated <a> element, so
# the message runs script in the recipient's webmail session when opened
# (exploited in the wild, CISA KEV). Fixed in 1.4.14, 1.5.4 and 1.6.3. The bug
# fires in the victim's browser on a received mail, so there is no server-side
# behaviour to probe: the feed is a version check (QoD 70).
#
# DETECTION: Roundcube 1.4+ prints its version in the login page's JS env as a
# 5-digit JSON number, `rcmail.set_env({..."rcversion":10602,...})` = major*10000 +
# minor*100 + patch (rcmail_output_html.php; checked on the real
# roundcube/roundcubemail:<ver>-apache images, #2612 — the previous pattern
# expected a quoted dotted `rcversion='1.6.2'` real Roundcube never sends, and only
# covered 1.6.x). 1.0–1.3 expose no version in pages: the feed then reads the first
# "RELEASE x.y.z" heading of <dir>/CHANGELOG (the stock .htaccess blocks it on
# Apache; nginx installs serve it); 0.x releases use the same heading. One pass per common install directory,
# stopping at the first finding.
uid: ed4727c9-5d8a-420b-805d-bb26939cc350
name: "Roundcube Webmail persistent XSS via crafted links in plain-text messages (CVE-2023-43770)"
description: |
  Reports Roundcube Webmail versions affected by CVE-2023-43770 (before 1.4.14,
  1.5.x before 1.5.4, and 1.6.x before 1.6.3): a crafted link in a plain-text
  e-mail breaks out of the link markup Roundcube generates and runs script in the
  recipient's webmail session when the message is opened. The check reads the
  version Roundcube publishes on its login page (the rcversion value of the page's
  JavaScript environment, present since 1.4) or, for releases before 1.4, the first
  release heading of the CHANGELOG file, in the web root and in the /roundcube,
  /webmail and /roundcubemail directories. It is a version check: no payload is
  sent and no login is attempted.
cves: [CVE-2023-43770]
cvss: 6.1
severity: medium
category: xss
confidence_base: 0.30
tags: [roundcube, webmail, xss, kev, apt28]
services: [http, https]
author: noctis
version: "1.1.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2023-43770"
  - "https://roundcube.net/news/2023/09/15/security-update-1.6.3-released"
  - "https://github.com/roundcube/roundcubemail/commit/e92ec206a886461245e1672d8530cc93c618a49b"

steps:
  # ── One pass per install directory; `stop: true` ends at the first finding ─
  - id: reset-login
    action: set_var
    var_name: login
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/roundcube", "/webmail", "/roundcubemail"]

  - id: reset-changelog
    action: set_var
    var_name: chlog
    var_value: {status: 0, body: ""}

  - id: fetch-login
    action: http_request
    method: GET
    path: "{{dir}}/?_task=login"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: true
    timeout_secs: 10
    store_as: login

  # 1.4+: "rcversion":NNNNN inside rcmail.set_env({...}) of the login page.
  - id: read-rcversion
    action: script
    store_as: rcv
    code: |
      let lb = if login.status == 200 && type_of(login.body) == "string" { login.body } else { "" };
      let m = eregmatch("rcmail\\.set_env\\(\\{[^\\n]*\"rcversion\":([1-9][0-9]{4})[,}]", lb);
      if m.len() > 1 { int(m[1]) } else { 0 }

  # 1.0–1.3 (no rcversion): the CHANGELOG's first release heading.
  - id: fetch-changelog
    action: http_request
    method: GET
    path: "{{dir}}/CHANGELOG"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "rcv == 0"
    store_as: chlog

  - id: version-verdict
    action: script
    store_as: verdict
    code: |
      let n = rcv;
      let src = "rcversion " + rcv.to_string() + " in " + dir + "/?_task=login";
      if n == 0 {
        src = "";
        let cb = if chlog.status == 200 && type_of(chlog.body) == "string" { chlog.body } else { "" };
        let c = eregmatch("^CHANGELOG Roundcube Webmail\\r?\\n=+\\r?\\n\\r?\\nRELEASE ([0-9]+)\\.([0-9]+)\\.([0-9]+)\\r?\\n", cb);
        if c.len() > 3 {
          n = int(c[1]) * 10000 + int(c[2]) * 100 + int(c[3]);
          src = dir + "/CHANGELOG";
        }
      }
      let ver = if n > 0 { (n / 10000).to_string() + "." + ((n / 100) % 100).to_string() + "." + (n % 100).to_string() } else { "" };
      // NVD: before 1.4.14, 1.5.0 to 1.5.3, and 1.6.0 to 1.6.2
      let vuln = n > 0 && (n < 10414 || (n >= 10500 && n < 10504) || (n >= 10600 && n < 10603));
      #{ vulnerable: vuln, version: ver, source: src }

  - id: report
    action: match
    source: verdict.vulnerable
    pattern: "^true$"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "Roundcube Webmail {{verdict.version}} (from {{verdict.source}}) is in the range affected by CVE-2023-43770 (before 1.4.14, 1.5.0–1.5.3, 1.6.0–1.6.2)"
      stop: true

View these feeds on GitHub