CVE catalog

CVE-2021-42574

rustc: CVE-2021-42574

[CVE catalog]

Severity
High · CVSS 8.5CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
12.88% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianrustcsid1.97.1+dfsg1-1fixed
Debianrustcforky1.97.1+dfsg1-1fixed
Debianrustctrixie1.85.1+dfsg1-1+deb13u1fixed
Debianrustcbookworm1.63.0+dfsg1-2fixed
Alpinerust3.191.56.1-r0fixed
Alpinerust3.201.56.1-r0fixed
Alpinerust3.211.56.1-r0fixed
Alpinerust3.221.56.1-r0fixed
Alpinerust3.231.56.1-r0fixed
Alpinerust3.241.56.1-r0fixed
Ubunturustc20.041.37.0+dfsg1+llvm-1ubuntu1vulnerable
Ubunturustc20.041.38.0+dfsg0.2+llvm-0ubuntu1vulnerable
Ubunturustc20.041.38.0+dfsg0.2+llvm-0ubuntu2vulnerable
Ubunturustc20.041.39.0+dfsg1+llvm-3ubuntu1vulnerable
Ubunturustc20.041.40.0+dfsg1+llvm-5ubuntu1vulnerable
Ubunturustc20.041.41.0+dfsg1+llvm-0ubuntu1vulnerable
Ubunturustc20.041.41.0+dfsg1+llvm-0ubuntu2vulnerable
Ubunturustc20.041.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1vulnerable
Ubunturustc20.041.47.0+dfsg1+llvm-1ubuntu1~20.04.1vulnerable
Ubunturustc20.041.51.0+dfsg1+llvm-1~exp3ubuntu1~20.04.2vulnerable
Ubunturustc20.041.53.0+dfsg1+llvm-4ubuntu1~20.04.1vulnerable
Ubunturustc20.041.57.0+dfsg1+llvm-0ubuntu1~20.04.1fixed
Ubunturustc22.041.51.0+dfsg1+llvm-1~exp3ubuntu1vulnerable
Ubunturustc22.041.53.0+dfsg1+llvm-4ubuntu1vulnerable
Ubunturustc22.041.54.0+dfsg2+llvm-3ubuntu1vulnerable
Ubunturustc22.041.56.0+dfsg1+llvm-2ubuntu1vulnerable
Ubunturustc22.041.56.0+dfsg1+llvm-2ubuntu2vulnerable
Ubunturustc22.041.57.0+dfsg1+llvm-0ubuntu1vulnerable
Ubunturustc22.041.57.0+dfsg1+llvm-0ubuntu2fixed
Opensuserust1.56tumbleweed1.56.1-1.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianrustcsourcesid1.57.0+dfsg1-1unimportantNot reportedNot reported
Debianrustcsourceforky1.57.0+dfsg1-1unimportantNot reportedNot reported
Debianrustcsourcetrixie1.57.0+dfsg1-1unimportantNot reportedNot reported
Debianrustcsourcebookworm1.57.0+dfsg1-1unimportantNot reportedNot reported
Alpinerustapk3.191.56.1-r0Not reportedALPINE-CVE-2021-42574Not reported
Alpinerustapk3.201.56.1-r0Not reportedALPINE-CVE-2021-42574Not reported
Alpinerustapk3.211.56.1-r0Not reportedALPINE-CVE-2021-42574Not reported
Alpinerustapk3.221.56.1-r0Not reportedALPINE-CVE-2021-42574Not reported
Alpinerustapk3.231.56.1-r0Not reportedALPINE-CVE-2021-42574Not reported
Alpinerustapk3.241.56.1-r0Not reportedALPINE-CVE-2021-42574Not reported
Ubunturustcdeb20.041.57.0+dfsg1+llvm-0ubuntu1~20.04.1Not reportedUBUNTU-CVE-2021-42574Not reported
Ubunturustcdeb22.041.57.0+dfsg1+llvm-0ubuntu2Not reportedUBUNTU-CVE-2021-42574Not reported
Opensuserust1.56rpmtumbleweed1.56.1-1.1Not reportedOPENSUSE-SU-2024:11650-1Not reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · amd64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · arm64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · amd64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · arm64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • Source package: [rustc]

    Details (1)
    • 1.63.0+dfsg1-2 · amd64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • [rust-all]Fixed

    Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • [rustc]Fixed
    Details (2)
    • 1.63.0+dfsg1-2 · amd64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · arm64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · amd64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · arm64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • [rust-doc]Fixed

    Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • [rustfmt]Fixed

    Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · amd64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · arm64 · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • [rust-gdb]Fixed

    Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • [rust-lldb]Fixed

    Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

  • [rust-src]Fixed

    Source package: [rustc]

    Details (2)
    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

    • 1.63.0+dfsg1-2 · all · bookworm

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · bookworm; dsa · rustc · debian · 12

[Debian 13 (Trixie)]

  • [cargo]Fixed

    Source package: [rustc]

    Details (4)
    • 1.85.0+dfsg3-1 · amd64 · trixie

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.85.0+dfsg3-1 · arm64 · trixie

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.94.1+dfsg1-1~bpo13+3 · amd64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.94.1+dfsg1-1~bpo13+3 · arm64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

  • [cargo-doc]Fixed

    Source package: [rustc]

    Details (20)
    • 1.85.0+dfsg3-1 · all · trixie

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.85.0+dfsg3-1 · all · trixie

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.86.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.86.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.87.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.87.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.88.0+dfsg1-2~bpo13+1 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.88.0+dfsg1-2~bpo13+1 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.89.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.89.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.90.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.90.0+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.91.1+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.91.1+dfsg1-1~bpo13+2 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.92.0+dfsg1-2~bpo13+1 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.92.0+dfsg1-2~bpo13+1 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.93.1+dfsg1-2~bpo13+1 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.93.1+dfsg1-2~bpo13+1 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.94.1+dfsg1-1~bpo13+3 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.94.1+dfsg1-1~bpo13+3 · all · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

  • Source package: [rustc]

    Details (2)
    • 1.85.0+dfsg3-1 · amd64 · trixie

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.85.0+dfsg3-1 · arm64 · trixie

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

  • Source package: [rustc]

    Details (2)
    • 1.86.0+dfsg1-1~bpo13+2 · amd64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.86.0+dfsg1-1~bpo13+2 · arm64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

  • Source package: [rustc]

    Details (2)
    • 1.87.0+dfsg1-1~bpo13+2 · amd64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.87.0+dfsg1-1~bpo13+2 · arm64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

  • Source package: [rustc]

    Details (2)
    • 1.88.0+dfsg1-2~bpo13+1 · amd64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.88.0+dfsg1-2~bpo13+1 · arm64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

  • Source package: [rustc]

    Details (2)
    • 1.89.0+dfsg1-1~bpo13+2 · amd64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.89.0+dfsg1-1~bpo13+2 · arm64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

  • Source package: [rustc]

    Details (2)
    • 1.90.0+dfsg1-1~bpo13+2 · amd64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

    • 1.90.0+dfsg1-1~bpo13+2 · arm64 · trixie-backports

      Fixed · Fixed: 1.57.0+dfsg1-1

      dsa · rustc · debian · 13

Next results

Observed:

References