{"answers":{"affected":"","exploited":"There is no known exploitation of CVE-2026-5958 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2026-5958 is a low-severity vulnerability in GNU Sed, published on 20 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-5958 and fix it if it is affected.\n\nWhat it is: CVE-2026-5958 is a low-severity vulnerability in GNU Sed, published on 20 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-5958 in the wild and no public exploit code.\n\nAffected product: GNU Sed. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-5958/ (Markdown: https://insights.sbomify.com/CVE-2026-5958/index.md)","id":"CVE-2026-5958","markdown":"https://insights.sbomify.com/CVE-2026-5958/index.md","name":"CVE-2026-5958","record":{"aliases":["AZL-83102","DEBIAN-CVE-2026-5958","ECHO-5725-fee5-80cd","GHSA-9r7w-j29g-xqx8","JLSEC-2026-213","MGASA-2026-0128","OESA-2026-2281","OESA-2026-2282","OESA-2026-2283","OESA-2026-2284","OESA-2026-2478","RHSA-2026:10995","SUSE-SU-2026:1659-1","SUSE-SU-2026:1699-1","SUSE-SU-2026:1941-1","SUSE-SU-2026:21413-1","SUSE-SU-2026:21448-1","SUSE-SU-2026:22256-1","SUSE-SU-2026:22325-1","UBUNTU-CVE-2026-5958","USN-8229-1","USN-8229-2","openSUSE-SU-2026:10649-1","openSUSE-SU-2026:21024-1"],"analysis":{"component_type":"operating_system","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"GNU Sed utility","requires_auth":"none","summary":"An attacker can exploit a race condition in GNU Sed to overwrite arbitrary files when using in-place editing with symlink following.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"CERT-PL","cpe":[],"cvss":{"score":2.1,"severity":"low","source":"cna","vector":"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"},"cwes":[{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"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: \n1. resolves symlink to its target and stores the resolved path for determining when output is written,\n2. opens the original symlink path (not the resolved one) to read the file. \nBetween 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.\n\nThis issue was fixed in version 4.10.","ecosystems":["Red Hat:hummingbird:1","SUSE:Linux Enterprise Server 16.0","SUSE:Linux Enterprise Server for SAP applications 16.0","SUSE:Linux Micro 6.2","openSUSE:Leap 16.0","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Race Condition in GNU Sed","id":"CVE-2026-5958","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"race_condition","year":"2026"},"n_packages":6,"n_references":2,"next":{"headline":"GL.iNet GL-RM1/GL-RM10/GL-RM10RC/GL-RM1PE Factory Reset improper authentication","id":"CVE-2026-5959"},"packages":[{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:4.10-1.hum1"],"introduced":["0"],"last_affected":[],"package":"sed","purl":"pkg:rpm/redhat/sed","source":"RHSA-2026:10995"},{"ecosystem":"SUSE:Linux Enterprise Server 16.0","fixed":["4.9-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"sed","purl":"pkg:rpm/suse/sed\u0026distro=SUSE%20Linux%20Enterprise%20Server%2016.0","source":"SUSE-SU-2026:22325-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP applications 16.0","fixed":["4.9-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"sed","purl":"pkg:rpm/suse/sed\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0","source":"SUSE-SU-2026:22325-1"},{"ecosystem":"SUSE:Linux Micro 6.2","fixed":["4.9-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"sed","purl":"pkg:rpm/suse/sed\u0026distro=SUSE%20Linux%20Micro%206.2","source":"SUSE-SU-2026:22256-1"},{"ecosystem":"openSUSE:Leap 16.0","fixed":["4.9-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"sed","purl":"pkg:rpm/opensuse/sed\u0026distro=openSUSE%20Leap%2016.0","source":"openSUSE-SU-2026:21024-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["4.10-1.1"],"introduced":["0"],"last_affected":[],"package":"sed","purl":"pkg:rpm/opensuse/sed\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:10649-1"}],"prev":{"headline":"EmailKit \u003c= 1.6.5 - Authenticated (Author+) Arbitrary File Read via 'emailkit-editor-template' REST Parameter","id":"CVE-2026-5957"},"products":["Sed"],"published":"2026-04-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-13","vendors":["GNU"]},"summary":"An attacker can exploit a race condition in GNU Sed to overwrite arbitrary files when using in-place editing with symlink following.","url":"https://insights.sbomify.com/CVE-2026-5958/"}