CVE-2026-116271

MIME::Parser::FileUnder versions before 5.521 for Perl reuse a pre-created output directory and follow symlinks in it, letting local users redirect attachment writes

Published Oct 28, 2026 CVSS 3.1 · 7 High EPSS < 1% KEV · Not listed
Description
MIME::Parser::FileUnder versions before 5.521 for Perl reuse a pre-created output directory and follow symlinks in it, letting local users redirect attachment writes.

Each message is written to a directory named msg-<time>-<pid>-<n> under the output base, and an existing directory of that name is used as is. A file name counts as unused when nothing exists at that path, which holds for a dangling symlink, and the body file is then opened in a way that follows the link.

When the output base is writable by other users, as with output_under("/tmp"), a local user can pre-create the directory with a symlink named like an attachment. The parser then writes the attachment to the link target with the privileges of the parsing process.

Analysis

AI-generated

Technical impact

The vulnerability allows a local user with write permission to a MIME::Parser::FileUnder output directory to redirect attachment writes through a pre‑created symlink. This causes the parser to create or overwrite arbitrary files on the system. If the parsing process runs with elevated privileges, the attacker can compromise system integrity by overwriting configuration or executable files. The weakness is a classic directory traversal and symlink exploitation (CWE‑59).

Affected Systems

MIME-tools for Perl is impacted, specifically MIME::Parser::FileUnder in all releases prior to 5.521. Any Perl application or script that uses this module for processing messages and writes attachments to a directory writable by non‑privileged users is susceptible. Version 5.521 and later remove the vulnerable behaviour by not reusing pre‑created directories and rejecting symlink targets.

Risk and Exploitability

The CVSS score is 7.0 and the EPSS score is < 1%. The vulnerability is exploitable only by local users who can write into the chosen output directory; there is no known remote exploitation vector or documented attack. It is not included in the CISA KEV catalog, but the potential for privilege escalation exists if the parser is run with higher permissions. Rapid patching or remediation of directory permissions mitigates the risk.

Remediation

Vendor Solution

Upgrade to MIME-tools 5.521 or later.


OpenCVE Recommended Actions

  • Upgrade MIME-tools to version 5.521 or later.
  • Ensure that any directories used by MIME::Parser::FileUnder are owned by the least‑privileged user and are not world‑writable; remove symlinks from those directories.
  • If the patch cannot be applied immediately, configure the application to use a dedicated, non‑writable temporary directory or disable symlink following if the API supports it.
  • Review all scripts and services that invoke MIME::Parser::FileUnder to confirm that no temporary directories can be manipulated by local users.

Generated by OpenCVE AI on November 5, 2026 at 22:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H'}

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Perl
Perl mime::parser::fileunder
Vendors & Products Perl
Perl mime::parser::fileunder
Type Values Removed Values Added
Description MIME::Parser::FileUnder versions before 5.521 for Perl reuse a pre-created output directory and follow symlinks in it, letting local users redirect attachment writes. Each message is written to a directory named msg-<time>-<pid>-<n> under the output base, and an existing directory of that name is used as is. A file name counts as unused when nothing exists at that path, which holds for a dangling symlink, and the body file is then opened in a way that follows the link. When the output base is writable by other users, as with output_under("/tmp"), a local user can pre-create the directory with a symlink named like an attachment. The parser then writes the attachment to the link target with the privileges of the parsing process.
Title MIME::Parser::FileUnder versions before 5.521 for Perl reuse a pre-created output directory and follow symlinks in it, letting local users redirect attachment writes
Weaknesses CWE-59
References
Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 5, 2026, 8:38 PM
Reserved
Oct 25, 2026, 6:05 PM
Status
Awaiting Analysis
Published
Oct 28, 2026, 6:17 PM
Modified
Nov 5, 2026, 9:18 PM
Severity
Moderate
Public date
Oct 28, 2026, 5:34 PM