79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Poste.io DMARC RCE as Root, Fixed in 2.5.22 (CVE-2026-127027)

Poste.io before 2.5.22 runs a root shell script on DMARC report attachments, so an unauthenticated email can inject commands (Critical 9.2).

TL;DR

  • Poste.io saved mail sent to dmarc-reports@<domain> without checking the sender, then ran a root script that unpacked the attachments with shell tools.
  • Every Poste.io release before 2.5.22 is affected when SMTP port 25 is reachable and the server accepts mail for a hosted domain's dmarc-reports@ address.
  • The CVE record scores it CVSS v4.0 9.2 Critical. No exploitation in the wild is known, and it is not in CISA KEV as of 2026-11-20.
  • Upgrade to 2.5.22 or later, currently 2.5.26, and recreate the container. See "How do I fix it?" for the free and PRO commands.

Am I affected?

All of these conditions must hold for a Poste.io server to be exposed:

  • The server runs Poste.io earlier than 2.5.22, either the free analogic/poste.io image or the PRO poste.io/mailserver image.
  • The SMTP service on port 25 is reachable from the internet, which is the normal configuration for a mail server that receives mail.
  • The server accepts mail for dmarc-reports@ on a domain it hosts. The vulnerable plugin runs for a recipient whose local part is dmarc-reports.
  • The attacker can send an email to that address. No mailbox login, sender verification or user interaction is required.
Branch Affected versions Fixed version
Poste.io 2.x Earlier than 2.5.22 2.5.22

The fix shipped in 2.5.22 on 2026-11-04. The current release is 2.5.26, published on 2026-11-19. The CVE record scores it CVSS v4.0 9.2. The vector is CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N, and the weakness is CWE-78.

The free analogic/poste.io image had 26,465,333 Docker Hub pulls on 2026-11-20. The vendor site says the product has been deployed in more than 170 countries.

Check the running release:

# Image tag or digest the container was started from
docker inspect --format '{{.Config.Image}}' mailserver

# Admin dashboard: the sidebar shows the running version
# to a super administrator

The admin dashboard is the reliable product-version check. The poste --version command prints the command-line framework version, not the Poste.io release.

How do I fix it?

Upgrade to 2.5.22 or later and recreate the container with the same data directory. The fix is in the mail-handling path, so pulling the image is not enough; the running container must be replaced.

  1. Back up the data directory. The quick update makes no copy of it.
  2. For the free image, pull the fixed release, stop and remove the old container, then start a new one with the same options:
docker pull analogic/poste.io:2
docker stop mailserver
docker rm mailserver
docker run --net=host -e TZ=Europe/Prague \
  -v /your-data-dir/data:/data \
  --name mailserver -h mail.example.com \
  -d -t analogic/poste.io:2
  1. For the PRO image, use poste.io/mailserver:2 in the same commands after docker login https://poste.io.
  2. Watch the new container start with docker logs -f mailserver. The mail server is down only while the container restarts; senders retry, so no mail is lost. Confirm the admin sidebar shows the new release before you close the change.

The :2 tag resolves to the current 2.x release, 2.5.26 on 2026-11-20. Pin analogic/poste.io:2.5.26 or poste.io/mailserver:2.5.26 if your deployment pins image tags. The commands are adapted from the Poste.io updating guide.

Poste.io publishes no configuration workaround for this flaw. As a stopgap, reject mail to dmarc-reports@ at the SMTP edge or in the mail server's recipient rules. That removes the entry point but also stops DMARC report collection, and it does not fix the root script if another path reaches it.

What is the root cause?

A DMARC aggregate report is an XML document that a receiving mail system sends to the domain owner's dmarc-reports@ address. The report arrives as a normal email, often with a gzip or zip attachment. Poste.io collects those reports so the domain owner can inspect authentication results.

The DMARC report handler wrote the raw message to disk. It then ran a root shell script. That script unpacked the attachments with external tools, using the sender's file names and archive contents.

The vulnerable Haraka plugin, opt/haraka-smtp/plugins/queue/dmarc-report-save.js in 2.5.21, ran for any recipient whose local part was dmarc-reports. It built the path from the recipient domain, wrote the message, and spawned the extractor:

const domain = connection.transaction.rcpt_to[0].host;
const dir = '/var/log/dmarc/' + domain;
const file = dir + '/dmarc-report-' + connection.transaction.uuid + ".eml";

// ...

const p = childproc.spawn('/opt/admin/bin/extract-report', [file, dir]);

The extractor, opt/admin/bin/extract-report in 2.5.21, was a 177-byte bash script:

#!/usr/bin/env bash

FILE=$1
DIR=$2

cd $DIR

cat $FILE | /usr/bin/munpack -f -q -C $DIR
unzip -o -q -j *.zip
gunzip -q *.gz 2> /dev/null
rm *.zip *.gz *.desc *.eml

chmod 644 *

munpack decodes the MIME parts and writes each attachment under the file name supplied in the message. The script then expands *.zip, *.gz and * in the shell and passes the resulting names to unzip, gunzip, rm and chmod, all as root. The sender controls the attachment names and the archive contents, and the script gives both to those tools without quoting or validation.

The directory is also shared across messages for the same domain. A sender can leave a file in the directory and rely on a later message to trigger the script over it. The script deletes .zip, .gz, .desc and .eml files at the end, but it runs the tools before that cleanup.

The CERT Polska advisory describes the result as command injection through crafted attachments, including file names and archive contents. The fixed code confirms the design change: it removes the shell script and does the decoding in the mail plugin, with generated names and no external tools.

How is it exploited?

An unauthenticated attacker sends a message to the DMARC report address with an attachment crafted to be interpreted by the root script.

  1. The attacker sends an email to dmarc-reports@<domain> on the target server.
  2. Haraka accepts the message without verifying the sender and writes it to /var/log/dmarc/<domain>/dmarc-report-<uuid>.eml.
  3. The plugin spawns /opt/admin/bin/extract-report with the message file and the directory.
  4. The root script decodes the attachment with munpack, which writes it under the sender-supplied file name.
  5. The script runs unzip, gunzip, rm and chmod over the directory. A crafted file name or archive content is interpreted by those commands.
  6. The command runs as root inside the Poste.io container.

No public proof of concept is linked in the advisory. The advisory states the mechanism and the fixed version but does not publish a payload, so this article does not include one.

How does the attack flow?

An ordinary email to the DMARC report address reaches a root shell script that treats the attachment as a command input.

flowchart LR A["Attacker sends email
to dmarc-reports@domain"] --> B["Haraka accepts
no sender check"] B --> C["Writes raw message
to /var/log/dmarc/domain/"] C --> D["Spawns extract-report
as root"] D --> E["munpack writes attachment
with sender file name"] E --> F["unzip, gunzip, chmod, rm
over attacker-named files"] F --> G["Command runs as root
in the container"]

What can an attacker do?

An attacker who can send mail to the DMARC report address can run commands as root inside the Poste.io container. The advisory states that impact directly and does not describe a host escape.

  • Read and modify the mail server's data, including mailboxes, configuration and TLS keys stored under /data.
  • Use the container's network position to reach internal services available to the mail server.
  • Persist in the container until it is recreated, and change mail flow or credentials.
  • Read the mail queue and the configuration that the container can reach, including the credentials used to relay or authenticate mail.

The attack requires the server to accept mail for dmarc-reports@ on a hosted domain and to expose SMTP port 25. The advisory does not report exploitation in the wild or a public proof of concept. A server that does not accept mail for that address is not reached through this path.

Why does the fix work?

The fix removes the root shell script and performs the decoding inside the Haraka plugin, so the message never reaches a shell and the sender never chooses a file name.

The fixed plugin in 2.5.22 and later documents the new design in its header:

// Anyone on the internet can mail dmarc-reports@<domain>, so everything here is
// untrusted: attachments are decoded by Haraka's MIME parser and unpacked
// in-process (zlib), no shell and no external tools. File names are generated
// (<transaction uuid>-<n>.xml), never taken from the message, so a sender can't
// pick or pre-claim a name. O_EXCL ('wx') never writes through a symlink.

The plugin now reads the attachment stream into a buffer. It caps each attachment and each decompressed report at 20 MB, and decodes gzip or zip with zlib in the Node.js process:

exports.extract = function (buf) {
    if (buf[0] === 0x1f && buf[1] === 0x8b) return [zlib.gunzipSync(buf, { maxOutputLength: MAX })];
    if (buf.length >= 4 && buf.readUInt32LE(0) === 0x04034b50) return unzip(buf);
    return [buf];
};

It accepts only a document whose root element is <feedback>, the RFC 7489 aggregate report, and writes it under a generated name with O_EXCL:

exports.is_report = function (buf) {
    return /^\uFEFF?\s*(<\?xml[^>]*\?>\s*)?(<!--[\s\S]*?-->\s*)*<feedback[\s>]/.test(buf.subarray(0, 4096).toString('utf8'));
};

// ...

fs.writeFileSync(path.join(dir, `${tx.uuid}-${written++}.xml`), xml, { flag: 'wx', mode: 0o644 });

The fix is complete for this path. The sender cannot choose a file name, the decompression does not invoke a shell or an external binary, and non-report content is dropped. The separate clean-dmarcs script still runs find over /data/log/dmarc, but it uses fixed paths and patterns rather than sender-controlled names.

How do I check if I was compromised?

CERT Polska and Poste.io publish no indicators of compromise, and no exploitation in the wild is known.

The vulnerable script deleted the .eml and the archives after processing, so a clean directory does not prove the server was not hit. Check these leads instead:

  • Mail logs for messages to dmarc-reports@ from senders you do not recognize, especially messages with attachments or unusual attachment names.
  • The Poste.io container for unexpected processes, outbound connections or changes to files under /data.
  • Files under /var/log/dmarc/<domain>/ that are not XML reports or that carry names with shell metacharacters or leading dashes.
  • Authentication and configuration changes that you cannot attribute to an administrator.

A hit is a lead, not proof. A failed attempt may leave only a mail log line and no file.

Timeline

  • 2026-11-04: Poste.io 2.5.22 is released with the fix.
  • 2026-11-19: Poste.io 2.5.26, the current release, is published.
  • 2026-11-20: CERT Polska publishes the advisory and CVE-2026-127027 is published.

Timeline of CVE-2026-127027: the 2.5.22 fix on 2026-11-04, then the advisory and CVE on 2026-11-20
Figure 1: The fix shipped 16 days before the advisory. Source: Poste.io changelog and CERT Polska advisory, checked November 20, 2026.

FAQ

Does the attacker need a mailbox on the server?

No. The attacker only needs to send an email to dmarc-reports@ on a domain the server hosts. The plugin runs before any mailbox authentication.

Is the free image affected as well as the PRO image?

Yes. The vulnerable plugin and the root extractor are in the free analogic/poste.io image and the PRO poste.io/mailserver image. The fix is in 2.5.22 for both.

Is there a public proof of concept?

No. The advisory describes the mechanism and the fixed version but publishes no exploit code.

Does the flaw give access to the host, or only the container?

The advisory states arbitrary commands as root within the Poste.io container. It does not describe a container escape or host compromise. The container holds the mail data and certificates mounted at /data, so the impact inside the container is still significant.

Can I disable DMARC report collection instead of upgrading?

The advisory does not document a supported switch. Rejecting mail to dmarc-reports@ at the SMTP edge removes the entry point as a stopgap, but it also stops report collection and does not fix the script. Upgrade to 2.5.22 or later.

Does the attacker need to know a hosted domain?

Yes. The plugin uses the recipient domain to build the directory and the report path. The attacker needs a domain that the server accepts mail for, which is usually visible from the server's MX records or from a bounce.

Is the vulnerability reachable through the web interface?

No. The advisory describes the SMTP path: a message to dmarc-reports@ triggers the handler. The web interface is not the entry point for this CVE.

Does the fix change how reports are stored?

Yes. Reports are now stored as generated <uuid>-<n>.xml files after validation, rather than as the raw message plus extracted attachments. Check any tooling that reads the old file names.

References

  • CERT Polska, "Vulnerability in Analogic Poste.io software", CVE-2026-127027: https://cert.pl/en/posts/2026/11/CVE-2026-127027 (checked November 20, 2026)
  • CVE Program, CVE-2026-127027: https://www.cve.org/CVERecord?id=CVE-2026-127027 (checked November 20, 2026)
  • Poste.io, changelog: https://poste.io/changelog (checked November 20, 2026)
  • Poste.io documentation, "Updating poste.io": https://poste.io/doc/updating (checked November 20, 2026)
  • Docker Hub, analogic/poste.io tags, where the 2.5.21 and 2.5.22 image layers were read for the plugin and extract-report source: https://hub.docker.com/r/analogic/poste.io/tags (checked November 20, 2026)
  • Docker Hub, poste.io/mailserver tags, the PRO image: https://hub.docker.com/r/poste.io/mailserver/tags (checked November 20, 2026)
  • Poste.io product page: https://poste.io/ (checked November 20, 2026)
  • Docker Hub, analogic/poste.io: https://hub.docker.com/r/analogic/poste.io (checked November 20, 2026)
  • CISA Known Exploited Vulnerabilities catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 20, 2026)