{"answers":{"affected":"","exploited":"There is no known exploitation of CVE-2026-50642 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2026-50642 yet. Limit exposure of the affected software until one is available.","what":"CVE-2026-50642 is a medium-severity vulnerability in diff-so-fancy, published on 29 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-50642 and fix it if it is affected.\n\nWhat it is: CVE-2026-50642 is a medium-severity vulnerability in diff-so-fancy, published on 29 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-50642 in the wild and no public exploit code.\n\nAffected product: diff-so-fancy. 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-50642/ (Markdown: https://insights.sbomify.com/CVE-2026-50642/index.md)","id":"CVE-2026-50642","markdown":"https://insights.sbomify.com/CVE-2026-50642/index.md","name":"CVE-2026-50642","record":{"aliases":["GHSA-q6jf-93cp-9xwf"],"analysis":{"component_type":"developer_tool","fix_type":"patch","impacts":["code_execution","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Git diff tool","requires_auth":"none","summary":"Attackers can inject terminal escape sequences to manipulate output, spoof filenames, or hijack clipboard, potentially leading to command execution during code review.","user_interaction":"required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"CERT-PL","cpe":[],"cvss":{"score":4.8,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:L/SA:N","version":"4.0"},"cwes":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"description":"diff‑so‑fancy does not properly sanitize non‑SGR terminal control sequences before outputting diff data. The application only strips ANSI SGR sequences while allowing other control characters, including carriage return (\\r) and escape sequences (e.g., OSC, CSI), to pass through unsanitized.\n\nAn attacker can embed malicious control sequences in filenames, diff metadata, or file content that are rendered directly in the terminal during diff viewing. This can lead to output manipulation, including filename spoofing, terminal screen clearing, and clipboard injection via supported escape sequences.\n\nSuccessful exploitation may mislead users during code review, alter terminal state, or result in unintended command execution through clipboard hijacking.\n\nThis issue has been fixed in the commit 9c81294","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"Terminal Escape Injection in diff‑so‑fancy","id":"CVE-2026-50642","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"other","year":"2026"},"n_packages":0,"n_references":2,"next":{"headline":"Out‑of‑Bounds Read in 8cc","id":"CVE-2026-50643"},"packages":[],"prev":{"headline":"Plaintext password storage in Streamsoft Business Intelligence","id":"CVE-2026-50641"},"products":["diff-so-fancy"],"published":"2026-07-29","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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-07-29","vendors":["so-fancy"]},"summary":"Attackers can inject terminal escape sequences to manipulate output, spoof filenames, or hijack clipboard, potentially leading to command execution during code review.","url":"https://insights.sbomify.com/CVE-2026-50642/"}