Vulnerabilities in pkg:pypi/nextcloud-mcp-server

PACKAGE
Advisory Identifier: GHSA-8vh3-g2qg-2h2c
Advisory Summary

CVE-2026-55640 is a CRITICAL (CVSS 9.1) unauthenticated `post /webhooks/nextcloud` allows arbitrary vulnerability (CWE-306: Missing Authentication for Critical Function) affecting nextcloud-mcp-server libraries in the PyPI ecosystem. The issue involves unauthenticated `post /webhooks/nextcloud` allows arbitrary vector data deletion when `webhook_secret` is unset ( default ). Remediation is available by upgrading affected packages to version 0.117.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/nextcloud-mcp-server

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/nextcloud-mcp-server. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8vh3-g2qg-2h2c CVE-2026-55640 CRITICAL nextcloud-mcp-server: Unauthenticated `POST /webhooks/nextcloud` allows arbitrary vector data deletion when `WEBHOOK_SECRET` is unset ( default )

CVE-2026-55640 at a Glance

CVE Identifier CVE-2026-55640
GHSA Identifier GHSA-8vh3-g2qg-2h2c
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product nextcloud-mcp-server
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-55640

To remediate this vulnerability, upgrade all affected nextcloud-mcp-server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nextcloud-mcp-server fixed: 0.117.2
pip install nextcloud-mcp-server>=0.117.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show nextcloud-mcp-server

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-55640, inspect your installed packages using pip:

pip show nextcloud-mcp-server

Analyze the terminal output to locate any version of nextcloud-mcp-server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.117.2), your application is affected.

Note: The pip show nextcloud-mcp-server command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In nextcloud-mcp-server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The `POST /webhooks/nextcloud` endpoint has no authentication by default: `WEBHOOK_SECRET` defaults to `None` and is never required by startup validation. When unset, the receiver accepts any unauthenticated POST. The `user_id` is taken directly from the attacker-supplied payload and passed to Qdrant, allowing an unauthenticated attacker to delete or corrupt vector embeddings for any user. ## Details **Vulnerable file:** `nextcloud_mcp_server/vector/webhook_receiver.py`, function `handle_nextcloud_webhook()`, **lines 55-67** **Root cause 1**: Auth check is guarded by `if secret`: - skipped entirely when `WEBHOOK_SECRET` is unset. **Root cause 2**: `webhook_secret: str | None = None` in config - no startup validator enforces it, even when vector sync is enabled. **Trusted field**: `payload["user"]["uid"]` in `webhook_parser.py` is used as-is for all Qdrant operations - no cross-check against an authenticated session. `webhook_receiver.py`, **lines 55-67**: ```python secret = get_settings().webhook_secret # None by default if secret: # skipped entirely when unset ... validate Bearer header ... else: _warn_missing_secret_once() # just logs, still processes ``` `webhook_parser.py`, **line 57**: ```python user_id = payload["user"]["uid"] # attacker-controlled ``` ## PoC **No credentials required**. Works on any deployment where `WEBHOOK_SECRET` is not explicitly set (the default). ```json POST /webhooks/nextcloud Content-Type: application/json { "event": { "class": "OCP\\Files\\Events\\Node\\BeforeNodeDeletedEvent", "node": { "path": "/victim/files/Notes/any.md", "id": 12345 } }, "user": { "uid": "victim" }, "time": 0 } ``` **Result:** **Qdrant** deletes all vector embeddings for `victim` doc `12345` with **no authentication**. Attacker can loop over doc IDs for mass deletion. All user targets accepted. ## Impact + Anyone on the network with access to port `8000` - no credentials needed. + Attacker can delete or trigger re-index of any user's vector embeddings in Qdrant by spoofing `user.uid` in the payload. + Mass-sending delete events for all doc IDs destroys the entire semantic search index for all users, requiring a full re-scan to recover. ## Recommend Fix 1. Enforce `WEBHOOK_SECRET` at startup ( file `config_validators.py` ) ```python if vector_sync_enabled and not settings.webhook_secret: raise ConfigurationError( "WEBHOOK_SECRET must be set when vector sync is enabled" ) ``` 2. Reject requests when secret is unset ( file `webhook_receiver.py` ) ```python secret = get_settings().webhook_secret if not secret: return JSONResponse({"status": "unavailable"}, status_code=503) provided = request.headers.get("authorization", "").encode() if not hmac.compare_digest(provided, f"Bearer {secret}".encode()): return JSONResponse({"status": "unauthorized"}, status_code=401) ```

CVE-2026-55640 Affected nextcloud-mcp-server Versions

1 component(s)
Fixed Versions:
0.117.2
Product / Package Ecosystem Affected Versions Fixed Version
nextcloud-mcp-server
PyPI
< 0.117.2
0.117.2

References

Frequently Asked Questions

What is CVE-2026-55640?
CVE-2026-55640 is a security vulnerability in nextcloud-mcp-server involving Unauthenticated `POST /webhooks/nextcloud` allows arbitrary vector data deletion when `WEBHOOK_SECRET` is unset ( default ) under CWE-306: Missing Authentication for Critical Function.
Which nextcloud-mcp-server versions are affected?
Affected versions include releases prior to 0.117.2 across affected packages: nextcloud-mcp-server.
What version fixes CVE-2026-55640?
Upgrading to 0.117.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nextcloud-mcp-server affected?
Yes, nextcloud-mcp-server is affected in releases prior to 0.117.2. Upgrade your dependency to 0.117.2 or later.
What is the CVSS score of CVE-2026-55640?
CVE-2026-55640 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-55640?
CVE-2026-55640 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check PyPI dependencies for CVE-2026-55640?
Run the dependency tree command: 'pip show nextcloud-mcp-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8vh3-g2qg-2h2c",
  "modified" : "2026-08-25T16:04:15Z",
  "published" : "2026-08-25T16:04:15Z",
  "aliases" : [ "CVE-2026-55640" ],
  "summary" : "nextcloud-mcp-server: Unauthenticated `POST /webhooks/nextcloud` allows arbitrary vector data deletion when `WEBHOOK_SECRET` is unset ( default )",
  "details" : "## Summary\nThe `POST /webhooks/nextcloud` endpoint has no authentication by default: `WEBHOOK_SECRET` defaults to `None` and is never required by startup validation. When unset, the receiver accepts any unauthenticated POST. The `user_id` is taken directly from the attacker-supplied payload and passed to Qdrant, allowing an unauthenticated attacker to delete or corrupt vector embeddings for any user.\n\n## Details\n**Vulnerable file:** `nextcloud_mcp_server/vector/webhook_receiver.py`, function `handle_nextcloud_webhook()`, **lines 55-67**\n\n**Root cause 1**: Auth check is guarded by `if secret`: - skipped entirely when `WEBHOOK_SECRET` is unset.\n\n**Root cause 2**: `webhook_secret: str | None = None` in config - no startup validator enforces it, even when vector sync is enabled.\n\n**Trusted field**: `payload[\"user\"][\"uid\"]` in `webhook_parser.py` is used as-is for all Qdrant operations - no cross-check against an authenticated session.\n\n`webhook_receiver.py`, **lines 55-67**:\n```python\nsecret = get_settings().webhook_secret  # None by default\nif secret:                           # skipped entirely when unset\n    ... validate Bearer header ...\nelse:\n    _warn_missing_secret_once()     # just logs, still processes\n```\n`webhook_parser.py`, **line 57**:\n```python\nuser_id = payload[\"user\"][\"uid\"]     # attacker-controlled\n```\n## PoC\n**No credentials required**. Works on any deployment where `WEBHOOK_SECRET` is not explicitly set (the default).\n```json\nPOST /webhooks/nextcloud\nContent-Type: application/json\n\n{\n  \"event\": {\n    \"class\": \"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\",\n    \"node\": { \"path\": \"/victim/files/Notes/any.md\", \"id\": 12345 }\n  },\n  \"user\": { \"uid\": \"victim\" },\n  \"time\": 0\n}\n```\n**Result:** **Qdrant** deletes all vector embeddings for `victim` doc `12345` with **no authentication**. Attacker can loop over doc IDs for mass deletion.  All user targets accepted.\n\n\n## Impact\n+ Anyone on the network with access to port `8000` - no credentials needed.\n+ Attacker can delete or trigger re-index of any user's vector embeddings in Qdrant by spoofing `user.uid` in the payload.\n+ Mass-sending delete events for all doc IDs destroys the entire semantic search index for all users, requiring a full re-scan to recover.\n\n## Recommend Fix\n1. Enforce `WEBHOOK_SECRET` at startup ( file `config_validators.py` )\n```python\nif vector_sync_enabled and not settings.webhook_secret:\n    raise ConfigurationError(\n        \"WEBHOOK_SECRET must be set when vector sync is enabled\"\n    )\n```\n2. Reject requests when secret is unset ( file `webhook_receiver.py` )\n```python\nsecret = get_settings().webhook_secret\nif not secret:\n    return JSONResponse({\"status\": \"unavailable\"}, status_code=503)\nprovided = request.headers.get(\"authorization\", \"\").encode()\nif not hmac.compare_digest(provided, f\"Bearer {secret}\".encode()):\n    return JSONResponse({\"status\": \"unauthorized\"}, status_code=401)\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nextcloud-mcp-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.117.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.117.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cbcoutinho/nextcloud-mcp-server/security/advisories/GHSA-8vh3-g2qg-2h2c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cbcoutinho/nextcloud-mcp-server/commit/4fc2b10945108cf1008ec9698291de6706ffcb73"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cbcoutinho/nextcloud-mcp-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cbcoutinho/nextcloud-mcp-server/tree/v0.117.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-25T16:04:15Z",
    "nvd_published_at" : null
  }
}