{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.7.8"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "b897240dc8181c53fbee231e77f88657c1edb9a0"
            },
            {
              "fixed": "899c8fe2d3ceb25d899e70dbd0c7744b7d7a0946"
            }
          ],
          "repo": "https://github.com/midnightbsd/mport",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-h3m9-vj4v-c35h"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-20",
      "CWE-693"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54577.json"
  },
  "details": "mport is the MidnightBSD Package Manager. Prior to 2.7.8, the audit command in mport/mport.c computed option-adjusted local_argv and local_argc values but passed the original argument entry to audit_package(). When an operator or automation used an option such as -r before a package name, stale optind state and the unadjusted argument could cause mport to audit the option token instead of the requested package, producing a false-negative or useless result that could leave a vulnerable package unidentified. The corrected parsing resets optind and optreset before using the adjusted local arguments. This issue is fixed in version 2.7.8.",
  "id": "CVE-2026-54577",
  "modified": "2026-09-19T03:30:51.248469641Z",
  "published": "2026-09-17T16:49:48.323Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MidnightBSD/mport/releases/tag/2.7.8"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54577.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/MidnightBSD/mport/security/advisories/GHSA-h3m9-vj4v-c35h"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-54577"
    },
    {
      "type": "FIX",
      "url": "https://github.com/MidnightBSD/mport/commit/b897240dc8181c53fbee231e77f88657c1edb9a0"
    },
    {
      "type": "FIX",
      "url": "https://github.com/MidnightBSD/mport/pull/149"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "mport audit can inspect the wrong package when options are present"
}