CVE-2025-47906 and CVE-2025-47907 in mongo

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator

      Problem Statement/Rationale

      Trivy scan of mongo:latest is reporting multiple CVEs in the mongo-tools

      Steps to Reproduce

      docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro aquasec/trivy:latest image --pkg-types os,library --exit-code 1 --severity HIGH,CRITICAL --timeout 10m --db-repository public.ecr.aws/aquasecurity/trivy-db --java-db-repository public.ecr.aws/aquasecurity/trivy-java-db mongo:latest

      Expected Results

      No CVEs should be found.

      Actual Results

      Report Summary
      
      ┌─────────────────────────────┬──────────┬─────────────────┬─────────┐
      │           Target            │   Type   │ Vulnerabilities │ Secrets │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ mongo:latest (ubuntu 24.04) │  ubuntu  │        0        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ opt/js-yaml/package.json    │ node-pkg │        0        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/bsondump            │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/mongodump           │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/mongoexport         │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/mongofiles          │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/mongoimport         │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/mongorestore        │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/mongostat           │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/bin/mongotop            │ gobinary │        2        │    -    │
      ├─────────────────────────────┼──────────┼─────────────────┼─────────┤
      │ usr/local/bin/gosu          │ gobinary │        3        │    -    │
      └─────────────────────────────┴──────────┴─────────────────┴─────────┘
      Legend:
      - '-': Not scanned
      - '0': Clean (no security findings detected)
      
      
      usr/bin/bsondump (gobinary)
      ===========================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/bin/mongodump (gobinary)
      ============================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/bin/mongoexport (gobinary)
      ==============================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/bin/mongofiles (gobinary)
      =============================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/bin/mongoimport (gobinary)
      ==============================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/bin/mongorestore (gobinary)
      ===============================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/bin/mongostat (gobinary)
      ============================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/bin/mongotop (gobinary)
      ===========================
      Total: 2 (HIGH: 2, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-47906 │ HIGH     │ fixed  │ v1.23.11          │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
      
      usr/local/bin/gosu (gobinary)
      =============================
      Total: 3 (HIGH: 3, CRITICAL: 0)
      
      ┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬───────────────────────────────────────────────────────────┐
      │ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                           │
      ├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼───────────────────────────────────────────────────────────┤
      │ stdlib  │ CVE-2025-22874 │ HIGH     │ fixed  │ v1.24.0           │ 1.24.4          │ crypto/x509: Usage of ExtKeyUsageAny disables policy      │
      │         │                │          │        │                   │                 │ validation in crypto/x509                                 │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-22874                │
      │         ├────────────────┤          │        │                   ├─────────────────┼───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47906 │          │        │                   │ 1.23.12, 1.24.6 │ If the PATH environment variable contains paths which are │
      │         │                │          │        │                   │                 │ executables ......                                        │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47906                │
      │         ├────────────────┤          │        │                   │                 ├───────────────────────────────────────────────────────────┤
      │         │ CVE-2025-47907 │          │        │                   │                 │ database/sql: Postgres Scan Race Condition                │
      │         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-47907                │
      └─────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴───────────────────────────────────────────────────────────┘
       

      Additional Notes

      N/A

            Assignee:
            Shyam Subramaniyam
            Reporter:
            Piotr Kowalczyk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: