{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "6.13.12"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "7.0.0"
                  },
                  {
                    "fixed": "7.8.13"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "8.0.0"
                  },
                  {
                    "fixed": "8.24.7"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "9.0.0"
                  },
                  {
                    "fixed": "9.11.4"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "fixed": "318f7e09dd363a1dfddb8180878488dccd2796d1"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "74df7769b5a8d89c4413b764029911ee915ea467"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "7a2a6567abbb72c0430c8cc5b7942141844fecff"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "fb467e6d33174293dc0360649f20ce68d99117a9"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "6.13.12",
                "range": [
                  {
                    "fixed": "cfc97ffcb3cf4acb45f3c19692fd727d7d142ed5"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "7.8.13",
                "range": [
                  {
                    "fixed": "c9f8fe4b878a03dd66f773b89f795b93c7f0e490"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "8.24.7",
                "range": [
                  {
                    "fixed": "d0e609c73787c996ec0fa40016ebd5ae0f12561f"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "9.11.4",
                "range": [
                  {
                    "fixed": "8d8b50f8b7e10bd28771d6874a10f971fe5ad5ac"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "cfc97ffcb3cf4acb45f3c19692fd727d7d142ed5"
            },
            {
              "introduced": "9b1ff1fe2ae42c985b31a57a084462a07619a546"
            },
            {
              "fixed": "c9f8fe4b878a03dd66f773b89f795b93c7f0e490"
            },
            {
              "introduced": "582156858db3ca7fbaa8950dc997e0d9e8117b21"
            },
            {
              "fixed": "d0e609c73787c996ec0fa40016ebd5ae0f12561f"
            },
            {
              "introduced": "93c780b6e1c24a6b4ab42c14e64a2500da87a54b"
            },
            {
              "fixed": "8d8b50f8b7e10bd28771d6874a10f971fe5ad5ac"
            },
            {
              "fixed": "318f7e09dd363a1dfddb8180878488dccd2796d1"
            },
            {
              "fixed": "74df7769b5a8d89c4413b764029911ee915ea467"
            },
            {
              "fixed": "7a2a6567abbb72c0430c8cc5b7942141844fecff"
            },
            {
              "fixed": "fb467e6d33174293dc0360649f20ce68d99117a9"
            }
          ],
          "repo": "https://github.com/automattic/mongoose",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-6972-9mcm-vhwj"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-1321"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125118.json"
  },
  "details": "Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Schema.prototype.virtual() builds nested virtual paths without applying the special-property validation already used by Schema.path() and Schema.add(). An attacker who can influence virtual field names in dynamic schemas, content-management form builders, or schema-as-code systems can supply path segments such as __proto__, constructor, or prototype, causing the virtual-path reducer to write enumerable properties to Object.prototype or Function.prototype. The resulting prototype pollution can spoof inherited property checks such as authorization flags and can provide function-prototype gadget state to other server-side JavaScript code. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4.",
  "id": "CVE-2026-125118",
  "modified": "2026-11-15T02:30:41.430745796Z",
  "published": "2026-11-09T22:29:55.070Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/6.13.12"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/7.8.13"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/8.24.7"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Automattic/mongoose/releases/tag/9.11.4"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/Automattic/mongoose/security/advisories/GHSA-6972-9mcm-vhwj"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125118.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125118"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/318f7e09dd363a1dfddb8180878488dccd2796d1"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/74df7769b5a8d89c4413b764029911ee915ea467"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/7a2a6567abbb72c0430c8cc5b7942141844fecff"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Automattic/mongoose/commit/fb467e6d33174293dc0360649f20ce68d99117a9"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Mongoose: Prototype pollution via Schema.prototype.virtual()"
}