CVE Explorer
CVE-2026-5958
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
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"defaultStatus":"unaffected","product":"Sed","repo":"https://gitweb.git.savannah.gnu.org/gitweb/?p=sed.git","vendor":"GNU","versions":[{"lessThan":"4.10","status":"affected","version":"4.1e","versionType":"custom"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:82754cdc30dfe9cd62c35d67fe98ca7244aaa502d7df2274edb4b16b2167fef0 · sha256:da45669d312ae4d0… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":2.1,"baseSeverity":"LOW","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW…
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:82754cdc30dfe9cd62c35d67fe98ca7244aaa502d7df2274edb4b16b2167fef0 · sha256:da45669d312ae4d0… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
1 source assertion{"cweId":"CWE-367","description":"CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:82754cdc30dfe9cd62c35d67fe98ca7244aaa502d7df2274edb4b16b2167fef0 · sha256:da45669d312ae4d0… · /containers/cna/problemTypes/0/descriptions/0
Source references
3 source assertions{"url":"http://www.openwall.com/lists/oss-security/2026/05/13/1"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:82754cdc30dfe9cd62c35d67fe98ca7244aaa502d7df2274edb4b16b2167fef0 · sha256:da45669d312ae4d0… · /containers/adp/1/references/0
{"tags":["third-party-advisory"],"url":"https://cert.pl/en/posts/2026/04/CVE-2026-5958"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:82754cdc30dfe9cd62c35d67fe98ca7244aaa502d7df2274edb4b16b2167fef0 · sha256:da45669d312ae4d0… · /containers/cna/references/1
{"tags":["product"],"url":"https://www.gnu.org/software/sed/"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:82754cdc30dfe9cd62c35d67fe98ca7244aaa502d7df2274edb4b16b2167fef0 · sha256:da45669d312ae4d0… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.