{
  "id": "CVE-2025-23061",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-23061",
  "published_at": "2025-01-15T00:00:00Z",
  "vendor": "mongoosejs",
  "product": "Mongoose",
  "cvss": {
    "score": 9.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2025-08-20T13:56:32Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 217.6,
    "source": "nuclei",
    "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-23061.yaml"
  },
  "poc_repo_count": 1,
  "exploit_count": 1,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "Mongoose before 8.9.5 can improperly use a nested $where filter with a populate() match, leading to search injection. NOTE: this issue exists because of an incomplete fix for CVE-2024-53900.",
  "cwe": "CWE-94",
  "cpes": [
    "cpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:*"
  ],
  "cvss_by_source": {
    "cna": 9,
    "nvd": 9.8
  },
  "repos": [
    {
      "repo": "open-flaw/CVE-2025-23061",
      "url": "https://github.com/open-flaw/CVE-2025-23061",
      "created_at": "2025-12-11T07:50:19Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 30,
      "suspicious": false,
      "suspicion_reasons": [
        "owner account created less than 7 days before the repo"
      ],
      "status": "analyzed",
      "owner_created_at": "2026-05-16T13:40:22Z"
    },
    {
      "repo": "amikanev/CVE-2025-23061-LAB",
      "url": "https://github.com/amikanev/CVE-2025-23061-LAB",
      "created_at": "2026-04-06T08:43:08Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "no network code found (normal for a local exploit)"
      ],
      "status": "analyzed",
      "owner_created_at": "2025-10-31T19:35:48Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "mongoosejs",
        "product": "Mongoose",
        "ranges": [
          "\u003e= 6.0.0, \u003c 6.13.6",
          "\u003e= 7.0.0, \u003c 7.8.4",
          "\u003e= 8.0.0, \u003c 8.9.5"
        ],
        "fixed_in": [
          "6.13.6",
          "7.8.4",
          "8.9.5"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Mongoose to 6.13.6 or 7.8.4 or 8.9.5 or later."
    ],
    "references": [
      {
        "kind": "Release notes",
        "url": "https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/Automattic/mongoose/releases/tag/8.9.5"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/Automattic/mongoose/commit/64a9f9706f2428c49e0cfb8e223065acc645f7bc"
      }
    ]
  },
  "exploit_refs": [
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-23061.yaml",
      "source": "nuclei",
      "title": "nuclei template: Mongoose - NoSQL Injection",
      "published_at": "2025-08-20T13:56:32Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "GET",
      "path_template": "/posts",
      "query_markers": [
        "authorMatch={\"$and\":[{\"$where\":...}]}"
      ],
      "ports": [
        3000
      ],
      "protocol": "http",
      "repos": [
        "open-flaw/CVE-2025-23061"
      ],
      "repo_count": 1,
      "confidence": 0.6,
      "evidence": [
        "open-flaw/CVE-2025-23061/exploit.js:15-54",
        "open-flaw/CVE-2025-23061/server.js:66-94"
      ]
    },
    {
      "method": "GET",
      "path_template": "/posts-2",
      "query_markers": [
        "query={\"path\":\"author\",\"match\":[{\"$or\":[{\"$where\":...}]}]}"
      ],
      "content_type": "application/json",
      "ports": [
        3000
      ],
      "protocol": "http",
      "repos": [
        "open-flaw/CVE-2025-23061"
      ],
      "repo_count": 1,
      "confidence": 0.6,
      "evidence": [
        "open-flaw/CVE-2025-23061/exploit.js:129",
        "open-flaw/CVE-2025-23061/exploit.js:142-152",
        "open-flaw/CVE-2025-23061/server.js:97-114"
      ]
    },
    {
      "method": "POST",
      "path_template": "/setup",
      "content_type": "application/json",
      "ports": [
        3000
      ],
      "protocol": "http",
      "repos": [
        "open-flaw/CVE-2025-23061"
      ],
      "repo_count": 1,
      "confidence": 0.6,
      "evidence": [
        "open-flaw/CVE-2025-23061/exploit.js:98"
      ]
    },
    {
      "method": "POST",
      "path_template": "/posts/search",
      "body_markers": [
        "\"authorMatch\":{\"$and\":[{\"$where\":\"this.isAdmin === true\"}]}"
      ],
      "content_type": "application/json",
      "ports": [
        3000
      ],
      "protocol": "http",
      "repos": [
        "open-flaw/CVE-2025-23061"
      ],
      "repo_count": 1,
      "confidence": 0.4,
      "evidence": [
        "open-flaw/CVE-2025-23061/exploit.js:114-118",
        "open-flaw/CVE-2025-23061/server.js:117-139"
      ]
    }
  ],
  "rules": []
}
