Advisory

DEBIAN-CVE-2026-5958

Also known as: CVE-2026-5958

Summary

The record has no summary.

Details

When sed is invoked with both -i (in-place edit) and --follow-symlinks, the function open_next_file() performs two separate, non-atomic filesystem operations on the same path: 1. resolves symlink to its target and stores the resolved path for determining when output is written, 2. opens the original symlink path (not the resolved one) to read the file. Between these two calls there is a race window. If an attacker atomically replaces the symlink with a different target during that window, sed will: read content from the new (attacker-chosen) symlink target and write the processed result to the path recorded in step 1. This can lead to arbitrary file overwrite with attacker-controlled content in the context of the sed process. This issue was fixed in version 4.10.

Severity

Not rated by the source.

Dates

Published
2026-04-20 12:16 UTC
Modified
2026-10-27 09:47 UTC

Affected packages and fixes

sed

Debian packages (deb) · Debian 12

Affected

  • introduced 0, fixed 4.9-1+deb12u1 (ecosystem)

Fixed versions

4.9-1+deb12u1

Fix

  • Fixed version 4.9-1+deb12u1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

sed

Debian packages (deb) · Debian 13

Affected

  • introduced 0, fixed 4.9-2+deb13u1 (ecosystem)

Fixed versions

4.9-2+deb13u1

Fix

  • Fixed version 4.9-2+deb13u1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

sed

Debian packages (deb) · Debian 14

Affected

  • introduced 0, fixed 4.9-3 (ecosystem)

Fixed versions

4.9-3

Fix

  • Fixed version 4.9-3
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Debian Security Tracker (converted by OSV.dev)

Debian Security Tracker, converted to OSV by OSV.dev.

Sources & licences