Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2019-16214

Libra Core before 2019-09-03 has an erroneous regular expression for inline comments, which makes it easier for attackers to interfere with code auditing by using a nonstandard line-break character for a comment. For example, a Move module author can enter the // sequence (which introduces a single-line comment), followed by very brief comment text, the \r character, and code that has security-critical functionality. In many popular environments, this code is displayed on a separate line, and thus a reader may infer that the code is executed. However, the code is NOT executed, because language/compiler/ir_to_bytecode/src/parser.rs allows the comment to continue after the \r character.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2019-16214
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:02 UTC · Revision 1

Source evidence

CVE-2019-16214

core-osv · Original source

Published 11 Sept 2019, 04:15 UTC

Libra Core before 2019-09-03 has an erroneous regular expression for inline comments, which makes it easier for attackers to interfere with code auditing by using a nonstandard line-break character for a comment. For example, a Move module author can enter the // sequence (which introduces a single-line comment), followed by very brief comment text, the \r character, and code that has security-critical functionality. In many popular environments, this code is displayed on a separate line, and thus a reader may infer that the code is executed. However, the code is NOT executed, because language/compiler/ir_to_bytecode/src/parser.rs allows the comment to continue after the \r character.

osv:CVE-2019-16214
Complete source record
{
  "id": "4a6fb40d91459fee127b28d2c8b1f916eb483962f80283294909db2fc49247e2",
  "url": "https://osv.dev/vulnerability/CVE-2019-16214",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2019-16214",
    "summary": "Libra Core before 2019-09-03 has an erroneous regular expression for inline comments, which makes it easier for attackers to interfere with code auditing by using a nonstandard line-break character for a comment. For example, a Move module author can enter the // sequence (which introduces a single-line comment), followed by very brief comment text, the \\r character, and code that has security-critical functionality. In many popular environments, this code is displayed on a separate line, and thus a reader may infer that the code is executed. However, the code is NOT executed, because language/compiler/ir_to_bytecode/src/parser.rs allows the comment to continue after the \\r character.",
    "evidence": "osv:CVE-2019-16214",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2019-16214",
      "aliases": [
        "CVE-2019-16214"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/diem/diem",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "7efb0221989f17fdf7f8486730898ed947a1e19e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "7efb0221989f17fdf7f8486730898ed947a1e19e"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-16214.json"
          }
        }
      ],
      "modified": "2026-10-20T10:52:27.301217146Z",
      "provider": "osv",
      "references": [
        "https://blog.openzeppelin.com/libra-vulnerability-release/",
        "https://github.com/libra/libra/commit/7efb0221989f17fdf7f8486730898ed947a1e19e",
        "https://blog.openzeppelin.com/libra-vulnerability-summary/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:libra:libra_core:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "libra:libra_core",
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2019-09-03"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2019-09-03"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2019-16214",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 383651,
  "published_at": "2019-09-11T04:15:11.887+00:00"
}