Skip to content
Heist/ feed
Back to feed
HighFix available

rust — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2021-42574

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

Products
rust
Affected versions
Not specified
Fixed versions
1.56.1-r0
CVEs
CVE-2021-42574
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 22:07 UTC · Revision 1

Source evidence

ALPINE-CVE-2021-42574

core-osv · Original source

Published 1 Nov 2021, 04:15 UTC

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

osv:ALPINE-CVE-2021-42574

rust

Fixed versions: 1.56.1-r0

rust

Fixed versions: 1.56.1-r0

rust

Fixed versions: 1.56.1-r0

rust

Fixed versions: 1.56.1-r0

rust

Fixed versions: 1.56.1-r0

rust

Fixed versions: 1.56.1-r0

Complete source record
{
  "id": "b51c028d90c1024953400dcc7749a24f1088c35af2076243ac2cbf6aeeb6b00e",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-42574",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2021-42574",
    "summary": "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 ",
    "evidence": "osv:ALPINE-CVE-2021-42574",
    "products": [
      {
        "name": {
          "value": "rust",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.56.1-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "rust",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.56.1-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "rust",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.56.1-r0",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "rust",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.56.1-r0",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "rust",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.56.1-r0",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "rust",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.56.1-r0",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2021-42574",
      "aliases": [
        "ALPINE-CVE-2021-42574"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.56.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust",
            "purl": "pkg:apk/alpine/rust?arch=source",
            "ecosystem": "Alpine:v3.19"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-42574.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.56.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust",
            "purl": "pkg:apk/alpine/rust?arch=source",
            "ecosystem": "Alpine:v3.20"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-42574.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.56.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust",
            "purl": "pkg:apk/alpine/rust?arch=source",
            "ecosystem": "Alpine:v3.21"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-42574.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.56.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust",
            "purl": "pkg:apk/alpine/rust?arch=source",
            "ecosystem": "Alpine:v3.22"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-42574.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.56.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust",
            "purl": "pkg:apk/alpine/rust?arch=source",
            "ecosystem": "Alpine:v3.23"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-42574.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.56.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust",
            "purl": "pkg:apk/alpine/rust?arch=source",
            "ecosystem": "Alpine:v3.24"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-42574.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-23T17:17:56.220989974Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-42574"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2021-42574"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-42574",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 415587,
  "published_at": "2021-11-01T04:15:07.97+00:00"
}