CVE-2026-5958
published low CVSS 4.0 · 2.1Race Condition in GNU Sed
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| GNU | — | Sed4.1e to < 4.10 · Other versions: unaffected | Affected | Not stated | CERT-PL |
| Amazon Linux | AL2 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| SUSE / openSUSE | SLE-12-SP5 | sedx86_64 | Advisory build | 4.2.2-7.6.1 | SUSE-SU-2026:1699-1 |
| Ubuntu | bionic | sed | Advisory build | 4.4-2ubuntu0.1~esm1 | USN-8229-2 |
| SUSE / openSUSE | SLE-12-SP5 | sed-langnoarch | Advisory build | 4.2.2-7.6.1 | SUSE-SU-2026:1699-1 |
| SUSE / openSUSE | SLE-15-SP7 | sedaarch64 | Advisory build | 4.9-150600.3.3.1 | SUSE-SU-2026:1941-1 |
| SUSE / openSUSE | SLE-15-SP7 | sedppc64le | Advisory build | 4.9-150600.3.3.1 | SUSE-SU-2026:1941-1 |
Show 30 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-15-SP7 | seds390x | Advisory build | 4.9-150600.3.3.1 | SUSE-SU-2026:1941-1 |
| SUSE / openSUSE | SLE-15-SP7 | sedx86_64 | Advisory build | 4.9-150600.3.3.1 | SUSE-SU-2026:1941-1 |
| SUSE / openSUSE | SLE-15-SP7 | sed-langnoarch | Advisory build | 4.9-150600.3.3.1 | SUSE-SU-2026:1941-1 |
| SUSE / openSUSE | SLE-16 | sedaarch64 | Advisory build | 4.9-160000.3.1 | SUSE-SU-2026:22325-1 |
| SUSE / openSUSE | SLE-16 | sedppc64le | Advisory build | 4.9-160000.3.1 | SUSE-SU-2026:22325-1 |
| SUSE / openSUSE | SLE-16 | seds390x | Advisory build | 4.9-160000.3.1 | SUSE-SU-2026:22325-1 |
| SUSE / openSUSE | SLE-16 | sedx86_64 | Advisory build | 4.9-160000.3.1 | SUSE-SU-2026:22325-1 |
| SUSE / openSUSE | SLE-16 | sed-langnoarch | Advisory build | 4.9-160000.3.1 | SUSE-SU-2026:22325-1 |
| SUSE / openSUSE | SLE-5 | sedaarch64 | Advisory build | 4.4-150300.13.6.1 | SUSE-SU-2026:1659-1 |
| SUSE / openSUSE | SLE-5 | sedppc64le | Advisory build | 4.4-150300.13.6.1 | SUSE-SU-2026:1659-1 |
| SUSE / openSUSE | SLE-5 | seds390x | Advisory build | 4.4-150300.13.6.1 | SUSE-SU-2026:1659-1 |
| SUSE / openSUSE | SLE-5 | sedx86_64 | Advisory build | 4.4-150300.13.6.1 | SUSE-SU-2026:1659-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | sedaarch64 | Advisory build | 4.9-160000.3.1 | OPENSUSE-SU-2026:21024-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | sedppc64le | Advisory build | 4.9-160000.3.1 | OPENSUSE-SU-2026:21024-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | seds390x | Advisory build | 4.9-160000.3.1 | OPENSUSE-SU-2026:21024-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | sedx86_64 | Advisory build | 4.9-160000.3.1 | OPENSUSE-SU-2026:21024-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | sed-langnoarch | Advisory build | 4.9-160000.3.1 | OPENSUSE-SU-2026:21024-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | sedaarch64 | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | sedppc64le | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | seds390x | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | sedx86_64 | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | sed-langaarch64 | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | sed-langppc64le | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | sed-langs390x | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | sed-langx86_64 | Advisory build | 4.10-1.1 | OPENSUSE-SU-2026:10649-1 |
| Ubuntu | focal | sed | Advisory build | 4.7-1ubuntu0.1~esm1 | USN-8229-2 |
| Ubuntu | jammy | sed | Advisory build | 4.8-1ubuntu2.1 | USN-8229-1 |
| Ubuntu | noble | sed | Advisory build | 4.9-2ubuntu0.24.04.1 | USN-8229-1 |
| Ubuntu | questing | sed | Advisory build | 4.9-2ubuntu0.25.10.1 | USN-8229-1 |
| Ubuntu | resolute | sed | Advisory build | 4.9-2ubuntu1 | USN-8229-1 |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 2.1 / 10
- Severity
- low
- Provider
- CERT-PL · cna
- Vector string
- CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| GNU | Sed | 4.1e to < 4.10 (affected · custom)Default: unaffected | CERT-PL · cna |
Weaknesses
1- CWE-367 CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
References
3Provider assertions
3CERT-PL · cna
Race Condition in GNU Sed
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2fc349d244dc00fd420a76519255f5e3a70988a5622864697c45ba39e02af18c
- Ingested
- 23 Sep 2026, 09:23:35 UTC
- Source record
- Official CVE record