GHSA-66Q9-MXF2-XQW6

Vulnerability from github – Published: 2026-11-20 14:45 – Updated: 2026-11-20 14:45
VLAI
Summary
TeamPass folder re-parenting authorization bypass
Details

Summary

Missing authorization in the update_folder action: any authenticated non-read-only user can rename, re-parent and convert to personal any folder in the instance, moving another team's credential subtree into their own personal space and removing it from the organization. Confirmed at HEAD 2f271cdd (3.2.1.1), and present at 3.1.3.1 and 3.1.7.6.

The defect

The folder-management endpoint dispatches an update_folder action that renames and re-parents a folder. Unlike its sibling actions in the same file, it never checks the edited folder id or the submitted parent id against the caller's accessible-folder set, and the file itself performs no session/authorization gate at all. By pointing the new parent at their own personal folder, an authenticated low-privilege user takes ownership of any folder in the instance.

app/sources/folders.queries.php: - The file never calls the session/authorization helpers: a grep for checkSession and userAccessPage across the whole file returns zero hits. - case 'update_folder' (lines 294-662) contains no reference to the caller's user-accessible_folders set. The only access-related logic is the personal-folder computation at lines 428-468 and the guard at line 503, which short-circuits on (int) $isPersonal === 1. - The sibling actions do carry the check: case 'add_folder' validates against user-accessible_folders at line 743, case 'delete_folders' at line 904, and case 'copy_folder' applies the equivalent parent check.

So update_folder is the one folder-mutating action in the file without an authorization predicate on either the target folder id or the new parent id.

Attacker model and trace

An authenticated TeamPass user who is not read-only (no administrative role required). The attacker submits update_folder with the victim folder's id and a parentId pointing at their own personal folder. Because the new parent is personal, the personal-folder computation sets $isPersonal = 1, which satisfies the line 503 guard, and the update writes the new parent and personal_folder = 1 for the target folder.

Consequences: the stolen subtree is added to the attacker's accessible set on their next login, so the item list renders for them, and do_items_list_in_folder exposes the plaintext label, login, url, email and description of every credential in that subtree (item passwords stay sharekey-protected, hence C:L). Because the folder is now flagged personal, it disappears from the organization view for everyone else including administrators (the admin listing selects only personal_folder = 0), so this is also a denial of access to the real owners.

Verification

Source-verified at HEAD: no session/authorization helper anywhere in the file; the update_folder case contains no accessible-folders predicate while add_folder, delete_folders and copy_folder do; the personal-folder short-circuit at line 503. A live TeamPass instance was not stood up.

Secondary (needs a live confirmation before filing): there appears to be an unauthenticated variant. filter_input(INPUT_POST, 'key') returns null when omitted and $session->get('key') is null on a cookie-less session, so the null !== null comparison fails open; encryptClientServer is only set in public/index.php, so prepareExchangedData takes the plaintext-JSON branch. If that holds on a live instance this rises toward 9.4. The sibling actions fail closed on the anonymous path; only update_folder fails open. Please verify live, or report the authenticated variant alone (which stands on the source reading).

Suggested fix

In the update_folder case, verify that both the target folder id and the submitted parentId are members of the caller's user-accessible_folders set (mirroring add_folder and delete_folders) before applying the update, and reject a re-parent that would flip personal_folder for a folder the caller does not own. Adding the standard session/authorization gate to folders.queries.php as a whole is the more durable fix. Note items.queries.php has a second, identically named update_folder case that does perform the accessible-folders check, but that one can only edit title/complexity; the unguarded copy in folders.queries.php is the one the UI calls for re-parenting.

Tooling

AI assistance was used while investigating, but it was confirmed at HEAD that folders.queries.php contains no checkSession/userAccessPage call, that the update_folder case (lines 294-662) contains no accessible-folders predicate while add_folder (line 743) and delete_folders (line 904) do, and that the personal-folder short-circuit sits at line 503.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "nilsteampassnet/TeamPass"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.2.2.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-103035"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-639",
      "CWE-862"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-20T14:45:04Z",
    "nvd_published_at": "2026-11-19T19:17:16Z",
    "severity": "HIGH"
  },
  "details": "## Summary\n\nMissing authorization in the update_folder action: any authenticated non-read-only user can rename, re-parent and convert to personal any folder in the instance, moving another team\u0027s credential subtree into their own personal space and removing it from the organization. Confirmed at HEAD 2f271cdd (3.2.1.1), and present at 3.1.3.1 and 3.1.7.6.\n\n## The defect\n\nThe folder-management endpoint dispatches an update_folder action that renames and re-parents a folder. Unlike its sibling actions in the same file, it never checks the edited folder id or the submitted parent id against the caller\u0027s accessible-folder set, and the file itself performs no session/authorization gate at all. By pointing the new parent at their own personal folder, an authenticated low-privilege user takes ownership of any folder in the instance.\n\napp/sources/folders.queries.php:\n- The file never calls the session/authorization helpers: a grep for checkSession and userAccessPage across the whole file returns zero hits.\n- case \u0027update_folder\u0027 (lines 294-662) contains no reference to the caller\u0027s user-accessible_folders set. The only access-related logic is the personal-folder computation at lines 428-468 and the guard at line 503, which short-circuits on `(int) $isPersonal === 1`.\n- The sibling actions do carry the check: case \u0027add_folder\u0027 validates against user-accessible_folders at line 743, case \u0027delete_folders\u0027 at line 904, and case \u0027copy_folder\u0027 applies the equivalent parent check.\n\nSo update_folder is the one folder-mutating action in the file without an authorization predicate on either the target folder id or the new parent id.\n\n## Attacker model and trace\n\nAn authenticated TeamPass user who is not read-only (no administrative role required). The attacker submits update_folder with the victim folder\u0027s id and a parentId pointing at their own personal folder. Because the new parent is personal, the personal-folder computation sets $isPersonal = 1, which satisfies the line 503 guard, and the update writes the new parent and personal_folder = 1 for the target folder.\n\nConsequences: the stolen subtree is added to the attacker\u0027s accessible set on their next login, so the item list renders for them, and do_items_list_in_folder exposes the plaintext label, login, url, email and description of every credential in that subtree (item passwords stay sharekey-protected, hence C:L). Because the folder is now flagged personal, it disappears from the organization view for everyone else including administrators (the admin listing selects only personal_folder = 0), so this is also a denial of access to the real owners.\n\n## Verification\n\nSource-verified at HEAD: no session/authorization helper anywhere in the file; the update_folder case contains no accessible-folders predicate while add_folder, delete_folders and copy_folder do; the personal-folder short-circuit at line 503. A live TeamPass instance was not stood up.\n\nSecondary (needs a live confirmation before filing): there appears to be an unauthenticated variant. filter_input(INPUT_POST, \u0027key\u0027) returns null when omitted and $session-\u003eget(\u0027key\u0027) is null on a cookie-less session, so the null !== null comparison fails open; encryptClientServer is only set in public/index.php, so prepareExchangedData takes the plaintext-JSON branch. If that holds on a live instance this rises toward 9.4. The sibling actions fail closed on the anonymous path; only update_folder fails open. Please verify live, or report the authenticated variant alone (which stands on the source reading).\n\n## Suggested fix\n\nIn the update_folder case, verify that both the target folder id and the submitted parentId are members of the caller\u0027s user-accessible_folders set (mirroring add_folder and delete_folders) before applying the update, and reject a re-parent that would flip personal_folder for a folder the caller does not own. Adding the standard session/authorization gate to folders.queries.php as a whole is the more durable fix. Note items.queries.php has a second, identically named update_folder case that does perform the accessible-folders check, but that one can only edit title/complexity; the unguarded copy in folders.queries.php is the one the UI calls for re-parenting.\n\n## Tooling\n\nAI assistance was used while investigating, but it was confirmed at HEAD that folders.queries.php contains no checkSession/userAccessPage call, that the update_folder case (lines 294-662) contains no accessible-folders predicate while add_folder (line 743) and delete_folders (line 904) do, and that the personal-folder short-circuit sits at line 503.",
  "id": "GHSA-66q9-mxf2-xqw6",
  "modified": "2026-11-20T14:45:04Z",
  "published": "2026-11-20T14:45:04Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nilsteampassnet/TeamPass/security/advisories/GHSA-66q9-mxf2-xqw6"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-103035"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nilsteampassnet/TeamPass/commit/e022b27f99149995c90a81f83b8e0ae8b48f5a20"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nilsteampassnet/TeamPass"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nilsteampassnet/TeamPass/releases/tag/3.2.1.2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "TeamPass folder re-parenting authorization bypass"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…