Skip to content

Python and Homebrew brotli matched to the Go port's CPE (andybalholm:brotli), missing Google brotli CVEs #57201

Open

Description

@juan-fdz-hawa

Fleet versions

  • Discovered: main (702fa07637), with the CPE database from nvd release 202610290055
  • Reproduced: main (58124479ac), with nvd releases 202610290055 through 202610310124

Web browser and operating system: N/A (vulnerability processing)


💥 Actual behavior

The Python package Brotli 1.0.9 (python_packages) is matched to the CPE for the Go port of brotli. The brotli Homebrew formula (homebrew_packages) has the same problem:

cpe:2.3:a:andybalholm:brotli:1.0.9:*:*:*:*:python:*:*

On 2026-10-29, NVD added andybalholm:brotli CPEs with target_sw=go and re-issued the google:brotli CPEs with target_sw=-. In CPEFromSoftware, both vendors pass cpeItemMatchesSoftware, and both score 0 in cpeTargetSWMatchesSoftware, because neither go nor - matches python. The software has no vendor, so the vendor tie-breaker doesn't apply either. With a full tie, the first candidate wins. Candidates are ordered by vendor, so andybalholm comes before google.

As a result, Python and Homebrew brotli get the Go port's CPE. Fleet generates the CPE with the software's own target_sw (python or macos), so it matches neither the Go port's CVEs (target_sw=go) nor Google's. Google brotli vulnerabilities are missed, for example CVE-2020-8927 on versions before 1.0.8.

TestCPEFromSoftwareIntegration has failed in the nightly vuln job on every run since 2026-10-29:

expected: "cpe:2.3:a:google:brotli:1.0.9:*:*:*:*:python:*:*"
actual  : "cpe:2.3:a:andybalholm:brotli:1.0.9:*:*:*:*:python:*:*"

No code under server/vulnerabilities/ changed between the last passing run (2026-10-28, d4a0f4c044) and the first failing run. Running the test locally passes with the nvd release 202610280126 CPE database and fails with 202610290055 and later.

🛠️ Expected behavior

Brotli from python_packages and brotli from homebrew_packages map to google:brotli, for example cpe:2.3:a:google:brotli:1.0.9:*:*:*:*:python:*:*.

🧑‍💻 Steps to reproduce

These steps:

  • Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  • Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
  1. Download and decompress cpe-*.sqlite.gz from nvd release 202610290055 or later.
  2. Run NVD_TEST_CPEDB_PATH=<path to cpe.sqlite> go test -tags fts5 -run 'TestCPEFromSoftwareIntegration$' ./server/vulnerabilities/nvd/.
  3. The test fails on the Brotli case with the output shown above.

🕯️ More info (optional)

Activity

  1. added
    bugSomething isn't working as documented
    :productProduct Design department (shows up on 🦢📨🎉 Product design intake & outtake board)
    on Nov 2, 2026
  2. moved this from 📨 Inbox to 🐣 In progress in 🛡️ #g-supply-chainon Nov 2, 2026
  3. added this to the 4.95.0 milestone on Nov 2, 2026
  4. self-assigned this
    on Nov 2, 2026
  5. moved this from 🐣 In progress to 🐥 Ready for review in 🛡️ #g-supply-chainon Nov 2, 2026
  6. changed the title [-]Python packages can match CPEs scoped to a different ecosystem (e.g. Brotli → andybalholm:brotli)[/-] [+]Python and Homebrew brotli matched to the Go port's CPE (andybalholm:brotli), missing Google brotli CVEs[/+] on Nov 2, 2026
  7. added a commit that references this issue on Nov 2, 2026
    e58b706
  8. moved this from 🐥 Ready for review to ✔️ Awaiting QA in 🛡️ #g-supply-chainon Nov 2, 2026
  9. marcusallen97 commented on Nov 6, 2026

    @marcusallen97
    Contributor

    The test case mentioned above passed.

    @juan-fdz-hawa - One gap this rule doesn't close, and I think it needs its own issue. CVE-2026-111497 (Google brotli decoder overflow, 1.0.3–1.0.9 / 1.1.0 / 1.2.0) is listed in NVD only as cpe:2.3:a:google:brotli::::::-::. Fleet generates target_sw=python / macos, which doesn't match -, so nvdvuln reports no CVE for Python Brotli 1.0.9 or Homebrew brotli 1.2.0 even though both are in range. CVE-2020-8927 only matched because its config uses target_sw=. That's the target_sw=- re-issue you called out in the description, so the vendor pin fixes the tie-break but not the match. Happy to file it if you agree.

  10. marcusallen97 commented on Nov 6, 2026

    @marcusallen97
    Contributor

    QA Summary

    Validated PR #57209 (issue #57201) on the 4.95 RC branch (e58b706d49, server 4.95.0-rc.2611051703) against nvd release 202611060046. Ran the issue's repro test plus a pre-fix negative control, the nvdvuln harness on the affected and neighbouring packages, and an end-to-end pass on a macOS host (brew install brotli 1.2.1, pip install Brotli==1.0.7) through refetch, the vulnerabilities cron, the DB and the software versions API. The fix works as written; one out-of-scope gap was found (NVD configs with target_sw=- still don't match Fleet's python/macos CPEs) and is being reported separately.

    Check Result Notes
    Issue repro test, nvd 202611060046 CPE DB ✅ TestCPEFromSoftwareIntegration PASS (0.27s, -v confirmed)
    Negative control, pre-fix translations ✅ FAIL on python 1.0.9 and homebrew 1.2.1, andybalholm picked; proves the DB reproduces the bug and the rule fixes it
    Full nvd package tests ✅ ok, 26.7s
    cmd/cpe/validate ✅ exit 0 (needs the gzipped DB in the dir)
    Published release carries the rule ✅ 202611060046, 1 brotli rule
    Nightly vuln bundle since merge ✅ green Nov 3, 4, 5, 6 (Nov 3/4 overall failures were unrelated jobs)
    Harness Python Brotli 1.0.7 ✅ cpe:2.3:a:google:brotli:1.0.7:::::python::, CVE-2020-8927
    Harness Python Brotli 1.0.9 ✅ google:brotli, no CVE-2020-8927
    Harness Python brotli 1.0.7 (lowercase) ✅ same as Brotli
    Harness Homebrew brotli 1.2.1 ✅ cpe:2.3:a:google:brotli:1.2.1:::::macos::, no CVEs
    Harness brotlicffi 1.1.0.0 ✅ python-hyper:brotlicffi, unchanged
    Harness brotlipy 0.7.0 ✅ no CPE, unchanged
    Live: host reports both packages ✅ script via fleetctl run-script; users CROSS JOIN python_packages returns Brotli 1.0.7, homebrew 1.2.1
    Live: software_cpe ✅ both rows google:brotli after cron run 92089
    Live: software_cve ✅ Brotli 1.0.7 → CVE-2020-8927; homebrew 1.2.1 → none
    Live: software versions API ✅ matches DB; libbrotli1 (deb) / libbrotli (rpm) unchanged
  11. moved this from ✔️ Awaiting QA to ✅ Ready for release in 🛡️ #g-supply-chainon Nov 9, 2026
  12. juan-fdz-hawa commented on Nov 10, 2026

    @juan-fdz-hawa
    ContributorAuthor

    The test case mentioned above passed.

    @juan-fdz-hawa - One gap this rule doesn't close, and I think it needs its own issue. CVE-2026-111497 (Google brotli decoder overflow, 1.0.3–1.0.9 / 1.1.0 / 1.2.0) is listed in NVD only as cpe:2.3:a:google:brotli::::::-::. Fleet generates target_sw=python / macos, which doesn't match -, so nvdvuln reports no CVE for Python Brotli 1.0.9 or Homebrew brotli 1.2.0 even though both are in range. CVE-2020-8927 only matched because its config uses target_sw=. That's the target_sw=- re-issue you called out in the description, so the vendor pin fixes the tie-break but not the match. Happy to file it if you agree.

    Thanks - let's file a new issue for this.

  13. marcusallen97 commented on Nov 10, 2026

    @marcusallen97
    Contributor

    Thanks @juan-fdz-hawa — filed as #58295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

#g-supply-chainSupply Chain product group:productProduct Design department (shows up on 🦢📨🎉 Product design intake & outtake board)bugSomething isn't working as documented

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions