Skip to content
Heist/ feed
UnratedFix available

DEBIAN-CVE-2026-5958

Type: advisorySource: OSV1 source record

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.

Announced Group revision 1
Original source ↗

DEBIAN-CVE-2026-5958

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:DEBIAN-CVE-2026-5958

sed

Source reference: /affected/0/package/name

Affected versions
4.9-1

Source reference: /affected/0/versions

Fixed versions
4.9-1+deb12u1

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

sed

Source reference: /affected/1/package/name

Affected versions
4.9-2

Source reference: /affected/1/versions

Fixed versions
4.9-2+deb13u1

Source reference: /affected/1/ranges

Prerequisites
Not stated in this record

sed

Source reference: /affected/2/package/name

Affected versions
4.9-2

Source reference: /affected/2/versions

Fixed versions
4.9-3

Source reference: /affected/2/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "4.9-1+deb12u1"
          }
        ]
      }
    ],
    "package": {
      "name": "sed",
      "purl": "pkg:deb/debian/sed?arch=source&distro=bookworm",
      "ecosystem": "Debian:12"
    },
    "versions": [
      "4.9-1"
    ],
    "database_specific": {
      "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-5958.json"
    },
    "ecosystem_specific": {
      "urgency": "not yet assigned"
    }
  },
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "4.9-2+deb13u1"
          }
        ]
      }
    ],
    "package": {
      "name": "sed",
      "purl": "pkg:deb/debian/sed?arch=source&distro=trixie",
      "ecosystem": "Debian:13"
    },
    "versions": [
      "4.9-2"
    ],
    "database_specific": {
      "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-5958.json"
    },
    "ecosystem_specific": {
      "urgency": "not yet assigned"
    }
  },
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "4.9-3"
          }
        ]
      }
    ],
    "package": {
      "name": "sed",
      "purl": "pkg:deb/debian/sed?arch=source&distro=forky",
      "ecosystem": "Debian:14"
    },
    "versions": [
      "4.9-2"
    ],
    "database_specific": {
      "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-5958.json"
    },
    "ecosystem_specific": {
      "urgency": "not yet assigned"
    }
  }
]

Publisher severity

No explicit severity was provided.

Event
#56046 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement