{"answers":{"affected":"It affects 3 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-42574 exists.","fix":"Apply the vendor's patch.","what":"CVE-2021-42574 is a high-severity code injection vulnerability in Fedoraproject Fedora, published on 1 Nov 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-42574 and fix it if it is affected.\n\nWhat it is: CVE-2021-42574 is a high-severity code injection vulnerability in Fedoraproject Fedora, published on 1 Nov 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-42574 exists.\n\nAffected product: Fedoraproject Fedora. 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-2021-42574/ (Markdown: https://insights.sbomify.com/CVE-2021-42574/index.md)","id":"CVE-2021-42574","markdown":"https://insights.sbomify.com/CVE-2021-42574/index.md","name":"CVE-2021-42574","record":{"aliases":["ALPINE-CVE-2021-42574","ALSA-2021:4585","ALSA-2021:4586","ALSA-2021:4587","ALSA-2021:4590","ALSA-2021:4591","ALSA-2021:4592","ALSA-2021:4593","ALSA-2021:4594","ALSA-2021:4595","ALSA-2021:4649","ALSA-2021:4743","CLEANSTART-2026-XV51845","CLSA-2026-1777310036","CLSA-2026-1777456424","DEBIAN-CVE-2021-42574","MGASA-2021-0517","OESA-2022-1501","RHSA-2021:4033","RHSA-2021:4034","RHSA-2021:4035","RHSA-2021:4036","RHSA-2021:4037","RHSA-2021:4038","RHSA-2021:4039","RHSA-2021:4585","RHSA-2021:4586","RHSA-2021:4587","RHSA-2021:4588","RHSA-2021:4589","RHSA-2021:4590","RHSA-2021:4591","RHSA-2021:4592","RHSA-2021:4593","RHSA-2021:4594","RHSA-2021:4595","RHSA-2021:4596","RHSA-2021:4598","RHSA-2021:4599","RHSA-2021:4600","RHSA-2021:4601","RHSA-2021:4602","RHSA-2021:4649","RHSA-2021:4669","RHSA-2021:4694","RHSA-2021:4723","RHSA-2021:4724","RHSA-2021:4729","RHSA-2021:4730","RHSA-2021:4743","RLSA-2021:4585","RLSA-2021:4586","RLSA-2021:4587","RLSA-2021:4590","RLSA-2021:4591","RLSA-2021:4592","RLSA-2021:4593","RLSA-2021:4594","RLSA-2021:4595","RLSA-2021:4649","RLSA-2021:4743","UBUNTU-CVE-2021-42574","openSUSE-SU-2024:11650-1"],"analysis":{"component_type":"operating_system","fix_type":"patch","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Unicode Bidirectional Algorithm","requires_auth":"none","summary":"Attackers can hide malicious logic in source code using Unicode control characters, bypassing human review and causing compilers to execute unintended code.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"fedora","vendor":"fedoraproject"},{"product":"starwind_virtual_san","vendor":"starwindsoftware"},{"product":"unicode","vendor":"unicode"}],"cvss":{"score":8.3,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"An issue was discovered in the Bidirectional Algorithm in the Unicode Specification through 14.0. It permits the visual reordering of characters via control sequences, which can be used to craft source code that renders different logic than the logical ordering of tokens ingested by compilers and interpreters. Adversaries can leverage this to encode source code for compilers accepting Unicode such that targeted vulnerabilities are introduced invisibly to human reviewers. NOTE: the Unicode Consortium offers the following alternative approach to presenting this concern. An issue is noted in the nature of international text that can affect applications that implement support for The Unicode Standard and the Unicode Bidirectional Algorithm (all versions). Due to text display behavior when text includes left-to-right and right-to-left characters, the visual order of tokens may be different from their logical order. Additionally, control characters needed to fully support the requirements of bidirectional text can further obfuscate the logical order of tokens. Unless mitigated, an adversary could craft source code such that the ordering of tokens perceived by human reviewers does not match what will be processed by a compiler/interpreter/etc. The Unicode Consortium has documented this class of vulnerability in its document, Unicode Technical Report #36, Unicode Security Considerations. The Unicode Consortium also provides guidance on mitigations for this class of issues in Unicode Technical Standard #39, Unicode Security Mechanisms, and in Unicode Standard Annex #31, Unicode Identifier and Pattern Syntax. Also, the BIDI specification allows applications to tailor the implementation in ways that can mitigate misleading visual reordering in program text; see HL4 in Unicode Standard Annex #9, Unicode Bidirectional Algorithm.","ecosystems":["AlmaLinux:8","Red Hat:devtools:2021","Red Hat:enterprise_linux:7::client","Red Hat:enterprise_linux:7::computenode","Red Hat:enterprise_linux:7::server","Red Hat:enterprise_linux:7::workstation","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:8::baseos","Red Hat:enterprise_linux:8::crb","Red Hat:rhel_aus:7.2::server","Red Hat:rhel_aus:7.3::server","Red Hat:rhel_aus:7.4::server","Red Hat:rhel_aus:7.6::server","Red Hat:rhel_aus:7.7::server","Red Hat:rhel_e4s:7.6::server","Red Hat:rhel_e4s:7.7::server","Red Hat:rhel_eus:8.1::appstream","Red Hat:rhel_eus:8.1::baseos","Red Hat:rhel_eus:8.2::appstream","Red Hat:rhel_eus:8.2::baseos","Red Hat:rhel_eus:8.4::appstream","Red Hat:rhel_eus:8.4::baseos","Red Hat:rhel_software_collections:3::el7","Red Hat:rhel_tus:7.6::server","Red Hat:rhel_tus:7.7::server","Rocky Linux:8","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2021-11-01","github_poc":11,"max_poc_stars":8,"metasploit":0,"nuclei":0,"refs":[{"date":"2021-11-02T15:32:38Z","kind":"github_poc","ref":"https://github.com/simplylu/CVE-2021-42574","stars":8,"title":"Generate malicious files using recently published bidi-attack (CVE-2021-42574)"},{"date":"2021-11-06T22:12:35Z","kind":"github_poc","ref":"https://github.com/maweil/bidi_char_detector","stars":6,"title":"Checks your files for existence of Unicode BIDI characters which can be misused for supply chain attacks. See CVE-2021-42574 "},{"date":"2026-03-21T01:37:38Z","kind":"github_poc","ref":"https://github.com/Moshe-ship/bidi-guard","stars":5,"title":"Scan code for invisible bidirectional Unicode characters (Trojan Source attack prevention, CVE-2021-42574)"},{"date":"2026-08-16T01:17:41Z","kind":"github_poc","ref":"https://github.com/rakib-nyc/nullorigin","stars":5,"title":"Research-only AI watermark \u0026 provenance robustness toolkit: local reverse proxy (OpenAI/Anthropic/Gemini) + CLI stripping C2PA/EXIF/XMP, zero-width \u0026 homoglyph Unicode, KGW text watermarks, DWT/Tree-Ring image stego, AudioSeal, PDF/DOCX/PPTX/XLSX metadata, and Trojan Source (CVE-2021-42574) code scanning."},{"date":"2023-01-31T18:15:00Z","kind":"github_poc","ref":"https://github.com/tin-z/solidity_CVE-2021-42574-POC","stars":3,"title":"POC of CVE-2021-42574 for solidity and solc compiler"},{"date":"2021-11-01T13:05:48Z","kind":"github_poc","ref":"https://github.com/sotiak/CVE-2021-42574","stars":1,"title":null},{"date":"2021-11-01T17:13:50Z","kind":"github_poc","ref":"https://github.com/hffaust/CVE-2021-42574_and_CVE-2021-42694","stars":1,"title":null},{"date":"2021-12-11T07:23:17Z","kind":"github_poc","ref":"https://github.com/waseeld/CVE-2021-42574","stars":1,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"Code injection in n/a","id":"CVE-2021-42574","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"fedoraproject:fedora","products":["fedoraproject:fedora"],"type":"code_injection","year":"2021"},"n_packages":504,"n_references":18,"next":{"headline":"Policies not properly enforced in OWASP Java HTML Sanitizer","id":"CVE-2021-42575"},"packages":[{"ecosystem":"AlmaLinux:8","fixed":["9.72-1.el8_5.2"],"introduced":["0"],"last_affected":[],"package":"annobin","purl":"pkg:rpm/almalinux/annobin","source":"ALSA-2021:4593"},{"ecosystem":"AlmaLinux:8","fixed":["9.72-1.el8_5.2"],"introduced":["0"],"last_affected":[],"package":"annobin-annocheck","purl":"pkg:rpm/almalinux/annobin-annocheck","source":"ALSA-2021:4593"},{"ecosystem":"AlmaLinux:8","fixed":["2.30-108.el8_5.1"],"introduced":["0"],"last_affected":[],"package":"binutils-devel","purl":"pkg:rpm/almalinux/binutils-devel","source":"ALSA-2021:4595"},{"ecosystem":"AlmaLinux:8","fixed":["1.54.0-3.module_el8.5.0+2599+d655d86c"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":"pkg:rpm/almalinux/cargo","source":"ALSA-2021:4590"},{"ecosystem":"AlmaLinux:8","fixed":["1.54.0-3.module_el8.5.0+2599+d655d86c"],"introduced":["0"],"last_affected":[],"package":"cargo-doc","purl":"pkg:rpm/almalinux/cargo-doc","source":"ALSA-2021:4590"},{"ecosystem":"AlmaLinux:8","fixed":["12.0.1-4.module_el8.4.0+2600+cefb5d4c"],"introduced":["0"],"last_affected":[],"package":"clang","purl":"pkg:rpm/almalinux/clang","source":"ALSA-2021:4743"},{"ecosystem":"AlmaLinux:8","fixed":["12.0.1-4.module_el8.4.0+2600+cefb5d4c"],"introduced":["0"],"last_affected":[],"package":"clang-analyzer","purl":"pkg:rpm/almalinux/clang-analyzer","source":"ALSA-2021:4743"},{"ecosystem":"AlmaLinux:8","fixed":["12.0.1-4.module_el8.4.0+2600+cefb5d4c"],"introduced":["0"],"last_affected":[],"package":"clang-devel","purl":"pkg:rpm/almalinux/clang-devel","source":"ALSA-2021:4743"},{"ecosystem":"AlmaLinux:8","fixed":["12.0.1-4.module_el8.4.0+2600+cefb5d4c"],"introduced":["0"],"last_affected":[],"package":"clang-libs","purl":"pkg:rpm/almalinux/clang-libs","source":"ALSA-2021:4743"},{"ecosystem":"AlmaLinux:8","fixed":["12.0.1-4.module_el8.4.0+2600+cefb5d4c"],"introduced":["0"],"last_affected":[],"package":"clang-resource-filesystem","purl":"pkg:rpm/almalinux/clang-resource-filesystem","source":"ALSA-2021:4743"},{"ecosystem":"AlmaLinux:8","fixed":["12.0.1-4.module_el8.4.0+2600+cefb5d4c"],"introduced":["0"],"last_affected":[],"package":"clang-tools-extra","purl":"pkg:rpm/almalinux/clang-tools-extra","source":"ALSA-2021:4743"},{"ecosystem":"AlmaLinux:8","fixed":["1.54.0-3.module_el8.5.0+2599+d655d86c"],"introduced":["0"],"last_affected":[],"package":"clippy","purl":"pkg:rpm/almalinux/clippy","source":"ALSA-2021:4590"},{"ecosystem":"AlmaLinux:8","fixed":["12.0.1-1.module_el8.4.0+2600+cefb5d4c"],"introduced":["0"],"last_affected":[],"package":"compiler-rt","purl":"pkg:rpm/almalinux/compiler-rt","source":"ALSA-2021:4743"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-4.el8_5.alma"],"introduced":["0"],"last_affected":[],"package":"cpp","purl":"pkg:rpm/almalinux/cpp","source":"ALSA-2021:4587"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-4.el8_5.alma"],"introduced":["0"],"last_affected":[],"package":"gcc","purl":"pkg:rpm/almalinux/gcc","source":"ALSA-2021:4587"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-4.el8_5.alma"],"introduced":["0"],"last_affected":[],"package":"gcc-c++","purl":"pkg:rpm/almalinux/gcc-c%2B%2B","source":"ALSA-2021:4587"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-4.el8_5.alma"],"introduced":["0"],"last_affected":[],"package":"gcc-gdb-plugin","purl":"pkg:rpm/almalinux/gcc-gdb-plugin","source":"ALSA-2021:4587"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-4.el8_5.alma"],"introduced":["0"],"last_affected":[],"package":"gcc-gfortran","purl":"pkg:rpm/almalinux/gcc-gfortran","source":"ALSA-2021:4587"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-4.el8_5.alma"],"introduced":["0"],"last_affected":[],"package":"gcc-offload-nvptx","purl":"pkg:rpm/almalinux/gcc-offload-nvptx","source":"ALSA-2021:4587"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-4.el8_5.alma"],"introduced":["0"],"last_affected":[],"package":"gcc-plugin-devel","purl":"pkg:rpm/almalinux/gcc-plugin-devel","source":"ALSA-2021:4587"},{"ecosystem":"AlmaLinux:8","fixed":["9.29-1.el8_5.2"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-annobin","purl":"pkg:rpm/almalinux/gcc-toolset-10-annobin","source":"ALSA-2021:4592"},{"ecosystem":"AlmaLinux:8","fixed":["2.35-8.el8_5.6"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-binutils","purl":"pkg:rpm/almalinux/gcc-toolset-10-binutils","source":"ALSA-2021:4649"},{"ecosystem":"AlmaLinux:8","fixed":["2.35-8.el8_5.6"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-binutils-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-binutils-devel","source":"ALSA-2021:4649"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-gcc","purl":"pkg:rpm/almalinux/gcc-toolset-10-gcc","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-gcc-c++","purl":"pkg:rpm/almalinux/gcc-toolset-10-gcc-c%2B%2B","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-gcc-gdb-plugin","purl":"pkg:rpm/almalinux/gcc-toolset-10-gcc-gdb-plugin","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-gcc-gfortran","purl":"pkg:rpm/almalinux/gcc-toolset-10-gcc-gfortran","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-gcc-plugin-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-gcc-plugin-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libasan-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-libasan-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libatomic-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-libatomic-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libitm-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-libitm-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-liblsan-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-liblsan-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libquadmath-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-libquadmath-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libstdc++-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-libstdc%2B%2B-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libstdc++-docs","purl":"pkg:rpm/almalinux/gcc-toolset-10-libstdc%2B%2B-docs","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libtsan-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-libtsan-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["10.3.1-1.2.el8_5"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-10-libubsan-devel","purl":"pkg:rpm/almalinux/gcc-toolset-10-libubsan-devel","source":"ALSA-2021:4585"},{"ecosystem":"AlmaLinux:8","fixed":["9.85-1.el8_5.1"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-11-annobin-annocheck","purl":"pkg:rpm/almalinux/gcc-toolset-11-annobin-annocheck","source":"ALSA-2021:4591"},{"ecosystem":"AlmaLinux:8","fixed":["9.85-1.el8_5.1"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-11-annobin-docs","purl":"pkg:rpm/almalinux/gcc-toolset-11-annobin-docs","source":"ALSA-2021:4591"},{"ecosystem":"AlmaLinux:8","fixed":["9.85-1.el8_5.1"],"introduced":["0"],"last_affected":[],"package":"gcc-toolset-11-annobin-plugin-gcc","purl":"pkg:rpm/almalinux/gcc-toolset-11-annobin-plugin-gcc","source":"ALSA-2021:4591"}],"prev":{"headline":"Missing authorization in n/a","id":"CVE-2021-42568"},"products":["n/a"],"published":"2021-11-01","related":[{"cvss_score":9.8,"headline":"PHP-CGI OS Command Injection","id":"CVE-2024-4577","kev_date_added":"2024-06-12","published":"2024-06-09"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2021-39226","kev_date_added":"2022-08-25","published":"2021-10-05"},{"cvss_score":9.8,"headline":"VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow","id":"CVE-2019-5544","kev_date_added":"2021-11-03","published":"2019-12-06"},{"cvss_score":9.6,"headline":"Google Chromium V8 Type Confusion","id":"CVE-2024-4947","kev_date_added":"2024-05-20","published":"2024-05-15"},{"cvss_score":9.6,"headline":"Google Chromium Visuals Use-After-Free","id":"CVE-2024-4671","kev_date_added":"2024-05-13","published":"2024-05-09"},{"cvss_score":9.6,"headline":"Google Chromium Mojo Insufficient Data Validation","id":"CVE-2022-3075","kev_date_added":"2022-09-08","published":"2022-09-26"},{"cvss_score":9.6,"headline":"Google Chromium Indexed DB API Use-After-Free","id":"CVE-2021-30633","kev_date_added":"2021-11-03","published":"2021-10-08"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-04","vendors":["n/a"]},"summary":"Attackers can hide malicious logic in source code using Unicode control characters, bypassing human review and causing compilers to execute unintended code.","url":"https://insights.sbomify.com/CVE-2021-42574/"}