PoC Monitor
← All CVEs
CVE-2025-23061published 15 Jan 2025 00:00 UTCData: JSON · API

Mongoosejs Mongoose

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.

First public PoC 218 daysafter publication · 20 Aug 2025 · nuclei template
Public PoCs21 on GitHub · 1 Exploit-DB, Metasploit or nuclei
CVSS9.8critical · scored by NVD · CWE-94
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

mongoosejs Mongoose
  • >= 6.0.0, < 6.13.6
  • >= 7.0.0, < 7.8.4
  • >= 8.0.0, < 8.9.5

Fixed in 6.13.6, 7.8.4, 8.9.5

Mitigation

Upgrade Mongoose to 6.13.6 or 7.8.4 or 8.9.5 or later.

References

Timeline

Days relative to CVE publication
t=0+30+60+90+120+150+180+210CVE published15 Jan 2025 · t = 0First public PoC20 Aug 2025 · t+218d

First public PoC 218 days after publication; not in CISA KEV. First PoC: nuclei template: Mongoose - NoSQL Injection (nuclei template, 20 Aug 2025).

PoC repositories

Found on GitHub.

1 PoCs · 1 pending

PoCs 1
RepositoryCreatedStarsAssessment
open-flaw/CVE-2025-23061 11 Dec 2025 +330 d 0 PoC
Flags · score 30
  • owner account created less than 7 days before the repo

Below the suspicion threshold (50); does not change the assessment.

Pending 1
RepositoryCreatedStarsAssessment
amikanev/CVE-2025-23061-LAB 6 Apr 2026 +1.2 y 0 Pending
Flags · score 15
  • no network code found (normal for a local exploit)

Below the suspicion threshold (50); does not change the assessment.

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.
SourceTitlePublishedFound by us
nuclei templatenuclei template: Mongoose - NoSQL Injection20 Aug 202514 Nov 2026

PoC characteristics

What to hunt for in your logs · from 1 PoC repo

GET /posts

Query
authorMatch={"$and":[{"$where":...}]}
Ports
3000
Seen in
1 repo: open-flaw/CVE-2025-23061
Evidence
open-flaw/CVE-2025-23061/exploit.js:15-54 open-flaw/CVE-2025-23061/server.js:66-94

GET /posts-2

Query
query={"path":"author","match":[{"$or":[{"$where":...}]}]}
Content-Type
application/json
Ports
3000
Seen in
1 repo: open-flaw/CVE-2025-23061
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

POST /setup

Content-Type
application/json
Ports
3000
Seen in
1 repo: open-flaw/CVE-2025-23061
Evidence
open-flaw/CVE-2025-23061/exploit.js:98

POST /posts/search

Body markers
"authorMatch":{"$and":[{"$where":"this.isAdmin === true"}]} in application/json
Ports
3000
Seen in
1 repo: open-flaw/CVE-2025-23061
Evidence
open-flaw/CVE-2025-23061/exploit.js:114-118 open-flaw/CVE-2025-23061/server.js:117-139

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

GET /posts
(?i)^/posts\?(?:.*&)?authorMatch=\{"\$and":\[\{"\$where":\.\.\.\}\]\}
GET /posts-2
(?i)^/posts-2\?(?:.*&)?query=\{"path":"author","match":\[\{"\$or":\[\{"\$where":\.\.\.\}\]\}\]\}
POST /setup
(?i)^/setup(?:[?#].*)?$
POST /posts/search
(?i)^/posts/search(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

GET /posts
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2025-23061 mongoosejs Mongoose exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/posts"; http.uri; content:"authorMatch={|22|$and|22|:[{|22|$where|22|:...}]}"; reference:url,poc.griffinguard.io/cve/CVE-2025-23061; classtype:web-application-attack; sid:9014612; rev:1;)
GET /posts-2
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2025-23061 mongoosejs Mongoose exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/posts-2"; http.uri; content:"query={|22|path|22|:|22|author|22|,|22|match|22|:[{|22|$or|22|:[{|22|$where|22|:...}]}]}"; reference:url,poc.griffinguard.io/cve/CVE-2025-23061; classtype:web-application-attack; sid:9612587; rev:1;)
POST /setup
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2025-23061 mongoosejs Mongoose exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/setup"; reference:url,poc.griffinguard.io/cve/CVE-2025-23061; classtype:web-application-attack; sid:9313440; rev:1;)
POST /posts/search
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2025-23061 mongoosejs Mongoose exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/posts/search"; http.request_body; content:"|22|authorMatch|22|:{|22|$and|22|:[{|22|$where|22|:|22|this.isAdmin === true|22|}]}"; reference:url,poc.griffinguard.io/cve/CVE-2025-23061; classtype:web-application-attack; sid:9206067; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

GET /posts
title: mongoosejs Mongoose exploit attempt (CVE-2025-23061)
id: gg-pocmon-cve-2025-23061-9014612
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-23061. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2025-23061
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/posts'
    cs-uri-query|contains|all:
      - 'authorMatch={"$and":[{"$where":...}]}'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2025.23061
GET /posts-2
title: mongoosejs Mongoose exploit attempt (CVE-2025-23061)
id: gg-pocmon-cve-2025-23061-9612587
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-23061. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2025-23061
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/posts-2'
    cs-uri-query|contains|all:
      - 'query={"path":"author","match":[{"$or":[{"$where":...}]}]}'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2025.23061
POST /setup
title: mongoosejs Mongoose exploit attempt (CVE-2025-23061)
id: gg-pocmon-cve-2025-23061-9313440
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-23061. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2025-23061
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/setup'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2025.23061
POST /posts/search
title: mongoosejs Mongoose exploit attempt (CVE-2025-23061)
id: gg-pocmon-cve-2025-23061-9206067
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-23061. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2025-23061
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/posts/search'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2025.23061