{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": [
              "cpe:2.3:a:nextcloud:nextcloud_server:*:*:*:*:-:*:*:*",
              "cpe:2.3:a:nextcloud:nextcloud_server:*:*:*:*:enterprise:*:*:*"
            ],
            "extracted_events": [
              {
                "introduced": "30.0.0"
              },
              {
                "fixed": "30.0.17"
              },
              {
                "introduced": "31.0.0"
              },
              {
                "fixed": "31.0.10"
              },
              {
                "introduced": "32.0.0"
              },
              {
                "fixed": "32.0.1"
              }
            ],
            "source": "CPE_RANGE"
          },
          "events": [
            {
              "introduced": "656488893e2175e19fbe273d76a5e16a598000c7"
            },
            {
              "fixed": "62ad08f260822c75ceba66a8355202b14a9bdb48"
            },
            {
              "introduced": "051e46a7a272300cf7c90b3e330fd1501fd6a996"
            },
            {
              "fixed": "082425bf9cb46fa22af0b95f2b2de0106d5cde49"
            },
            {
              "introduced": "5ee29decb00508122f008abacea26fb3e122b13c"
            },
            {
              "fixed": "b8bda08fe4ebafb5d2e0ddd1e3e25417e3d7a84f"
            }
          ],
          "repo": "https://github.com/nextcloud/server",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-24wp-p865-7j4r"
  ],
  "database_specific": {
    "cna_assigner": "mitre",
    "cwe_ids": [
      "CWE-749"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59788.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "fixed": "22.2.10.33"
          },
          {
            "introduced": "23"
          },
          {
            "fixed": "23.0.12.29"
          },
          {
            "introduced": "24"
          },
          {
            "fixed": "24.0.12.28"
          },
          {
            "introduced": "25"
          },
          {
            "fixed": "25.0.13.23"
          },
          {
            "introduced": "26"
          },
          {
            "fixed": "26.0.13.20"
          },
          {
            "introduced": "27"
          },
          {
            "fixed": "27.1.11.20"
          },
          {
            "introduced": "28"
          },
          {
            "fixed": "28.0.14.11"
          },
          {
            "introduced": "29"
          },
          {
            "fixed": "29.0.16.8"
          },
          {
            "introduced": "30"
          },
          {
            "fixed": "30.0.17"
          },
          {
            "introduced": "31"
          },
          {
            "fixed": "31.0.10"
          },
          {
            "introduced": "32"
          },
          {
            "fixed": "32.0.1"
          }
        ],
        "source": "AFFECTED_FIELD"
      },
      {
        "extracted_events": [
          {
            "fixed": "22.2.10.33"
          },
          {
            "introduced": "23"
          },
          {
            "fixed": "23.0.12.29"
          },
          {
            "introduced": "24"
          },
          {
            "fixed": "24.0.12.28"
          },
          {
            "introduced": "25"
          },
          {
            "fixed": "25.0.13.23"
          },
          {
            "introduced": "26"
          },
          {
            "fixed": "26.0.13.20"
          },
          {
            "introduced": "27"
          },
          {
            "fixed": "27.1.11.20"
          },
          {
            "introduced": "28"
          },
          {
            "fixed": "28.0.14.11"
          },
          {
            "introduced": "29"
          },
          {
            "fixed": "29.0.16.8"
          },
          {
            "introduced": "30"
          },
          {
            "fixed": "30.0.17"
          },
          {
            "introduced": "31"
          },
          {
            "fixed": "31.0.10"
          },
          {
            "introduced": "32"
          },
          {
            "fixed": "32.0.1"
          }
        ],
        "source": "CPE_FIELD"
      },
      {
        "extracted_events": [
          {
            "fixed": "22.2.10.33"
          }
        ],
        "source": "DESCRIPTION"
      }
    ]
  },
  "details": "Cross-site scripting (XSS) vulnerability in a reachable files_pdfviewer example directory in Nextcloud with versions before 22.2.10.33, 23.0.12.29, 24.0.12.28, 25.0.13.23, 26.0.13.20, 27.1.11.20, 28.0.14.11, 29.0.16.8, 30.0.17, 31.0.10, and 32.0.1 allows attackers to execute arbitrary JavaScript in the context of a user's browser via a crafted PDF file to viewer.html. This issue is related to CVE-2024-4367, but the root cause of this Nextcloud issue is that the product exposes executable example code on a same-origin basis.",
  "id": "CVE-2025-59788",
  "modified": "2026-07-08T05:36:38.758247168Z",
  "published": "2025-12-04T00:00:00Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://nextcloud.com"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59788.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/nextcloud/security-advisories/security/advisories/GHSA-24wp-p865-7j4r"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59788"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.redteam-pentesting.de/en/advisories/rt-sa-2025-003/"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}