---
id: "CVE-2026-116271"
kind: "vulnerability"
aliases: ["CVE-2026-116271"]
title: "Perl MIME::Parser: symlinks let local users redirect attachment writes"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["mime-tools", "package", "perl", "self-hosted"]
not_affected_if: ["no-mime-parser", "private-output-dir"]
published_at: "2026-10-28T18:17:13+00:00"
first_seen_at: "2026-10-28T18:34:33+00:00"
updated_at: "2026-10-28T18:35:23+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116271", "first_seen_at": "2026-10-28T18:34:33+00:00"}]
---

# Perl MIME::Parser: symlinks let local users redirect attachment writes

MIME::Parser::FileUnder before 5.521 reuses an existing output directory and opens files by following symlinks inside it. A local user who can write to a shared output base such as /tmp can make the parser write attachments to a file of their choosing, with the parsing process's privileges.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Find the Perl MIME-Tools version with `perl -MMIME::Parser -e 'print $MIME::Parser::VERSION'` and check whether it is below `5.521`
- Check whether code calls `output_under` on a shared, world-writable directory such as `/tmp`

## Fix

- Upgrade MIME-Tools (MIME::Parser) to `5.521` or later
- Write output to a private directory that other users cannot write to, not `/tmp`

## Timeline

- 2026-10-28T18:34:33+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116271

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
