John Jean

Chercheur en sécurité informatique. Fondateur de Wargan.

John Jean

Security researcher. Founder of Wargan.

eLabFTW 6.0.6: full user directory disclosure to any team member

ghsa
GHSA-qxg9-4cmh-xjgwGHSA-6xv4-h4g9-9vqcGHSA-9779-f2ph-2ff9
written
2026-10-07
released
2026-12-02
risk
high
affected
eLabFTW before 6.1.0: [I] 6.0.3 to 6.0.9, [II] and [III] every release including 5.6.x (unsupported, not fixed)
type
broken access control (CWE-284), information disclosure (CWE-200), missing authorization (CWE-862)
requires
  • an account attached to a team
  • or none: register first into a new team (see [I] B)
status
fixed in eLabFTW 6.1.0 (2026-11-24), CVE requested by the maintainer for [I] and [II]

[0] Application

From wikipedia.org:
« eLabFTW is a web application written by Nicolas Carpi in PHP which can be used to create personal and common logbooks. It has been developed at the Curie Institute originally. »

This software is deployed by universities and research institutes all over the world (the CNRS, INRAE, the Curie Institute, UC Berkeley, the University of Alberta, Cardiff University, UMC Utrecht, …). It ships as a Docker image (elabftw/elabimg), is deployed as one instance per organization, and its multi-team design assumes teams are trust boundaries.

The data below was verified end-to-end on a stock official install (elabctl install, official elabimg:stable image, populate, otherwise default configuration), from the position of an ordinary team member.

All three findings are fixed in eLabFTW 6.1.0. The maintainer tracks them as three GitHub advisories, GHSA-qxg9-4cmh-xjgw for [I], GHSA-6xv4-h4g9-9vqc for [II] and GHSA-9779-f2ph-2ff9 for [III], and requested a CVE for [I] and [II]; the numbers were pending when this page went public, it will be updated when they arrive. [I] exists since 6.0.3, which introduced the email masking it bypasses. [II] and [III] are older and also affect the 5.6 branch, which is no longer supported and will not be fixed.

[I] Unmasked emails of every user through the permissions resolver

A) Overview

Any account attached to a team can read the unmasked email address of every user of every team. The instance masks emails in its directory, on purpose and for GDPR reasons. The permissions engine does not: the product lets any user put arbitrary user identifiers in an entity’s access-control JSON, validates only the structure of that JSON, and then renders every identifier back through a global, unscoped lookup that includes the email address in clear text. Fifty identifiers at a time, the whole directory is unmasked.

B) Required data

  • An account attached to a team. Any validated member of any team qualifies. An outsider can get one too. Self-registration is open by default (local_register='1') and accepts any email domain; in an ordinary team a new account waits for an admin’s validation (admin_validate='1', Config.php:70), but the first active member of a team becomes its Admin and is validated on the spot (TeamsHelper.php:51-60, Users.php:142), with no email to anyone since the team has no active admin yet. New teams are visible by default and listed on the public sign-up page (register.php:60), so an outsider polling that page registers into a new team before its first real member does. A team whose members are all archived works the same way, without the wait (see [IV]).

C) Explanation

The product has a permissions editor: when you share an entity with specific people, the entity page renders who has access. The access list is stored as JSON in the entity’s canread column, and the page translates the identifiers back into human names through a helper (src/Elabftw/PermissionsHelper.php:34-44):

$result['users'] = $Teams->Users->readNamesFromIds($permArr['users'] ?? array());

That lookup (src/Models/Users/Users.php:540-551) is a global SELECT with no scoping and no gate, email included:

SELECT CONCAT(users.firstname, ' ', users.lastname) AS fullname, userid, email
FROM users WHERE userid IN (...)

and the template renders it as “fullname (email)” in the permissions modal (src/templates/permissions-edit-modal.html:121-131).

The structure of the can-json is validated where it is written (src/Services/Check.php:147-162): the validator checks that teams, teamgroups and users are arrays. Cross-team identifiers and identifier lists of any length are accepted. The product assumes the identifiers come from its own user-picker, where you would already have seen the people you are naming.

D) Exploitation

The chain is a single script. It registers the account (the public sign-up page also lists the visible teams to the anonymous visitor), logs in, and pulls the directory: GET /api/v2/users returns the complete instance directory in one response without any limit (emails are still masked at this stage). It then pulls the team register: GET /api/v2/teams returns every visible team identifier and name. Then, for each team identifier, it requests the roster: GET /api/v2/users?team=N, and cross-references the rosters into user-to-team memberships.

To beat the masking it needs one experiment of its own. The script creates it (POST /api/v2/experiments), then patches the entity’s canread with the full identifier list of the directory, in batches of fifty:

PATCH /api/v2/experiments/212?action=update
Content-Type: application/json

{"canread":"{\"teams\":[1,2,3,4,5,6,7,8],\"teamgroups\":[1,2,3],\"users\":[1,2,3,...,50]}"}

(the ?action=update in the URL is ignored: the API reads the action from the JSON body and a PATCH defaults to update, while a body action key would be rejected as an invalid update target). It then fetches the entity’s view page (the same GET a browser issues to render the page), and the permissions rendering hands back every requested identifier resolved to “fullname (email)”, the emails in clear text, plus the resolved names of every team and teamgroup named in the JSON. Fifty at a time, the whole directory is unmasked.

The video below shows the script against our own staging instance, set up with eLabFTW’s populate command, which turns off admin validation, so the fresh account logs in at once, as it would in a new or wound-down team (see B):

The script on our own staging instance.

E) Consequences

The directory itself (full names and unmasked emails of every account of every team) is personal data under the GDPR for the organizations the product targets.

[II] Hidden teams and cross-team rosters to any team member

A) Overview

The same account can list the members of every other team, including the teams deliberately hidden from the sign-up page, and learn the name and structure of every working group of the instance. The team-scoping parameter of the users endpoint accepts any team identifier without checking membership, and the permissions engine resolves team and group identifiers through the same unscoped lookups as [I].

Listing the names of the instance’s users is a feature of the product, meant for collaboration across teams, and this page does not count it as a finding: what [II] covers is the membership of each team, and the existence of teams the instance intends to hide.

B) Required data

The same account as [I].

C) Explanation

The API endpoint GET /api/v2/users is documented (“Read users from instance”) and intended for integrations. Its implementation (src/Models/Users/Users.php:481-516) is careful about fields: for every user other than the requester and those the requester administers, it masks the email:

$user['email'] = self::maskEmail($user['email']);

and strips the sensitive columns (auth_service, created_at, orgid, has_mfa_enabled, validated, valid_until, is_sysadmin, teams) with removeKeys (Users.php:497). The same method takes a ?team= parameter, and when the parameter is absent the query has no team predicate at all:

$team = $Request->query->getInt('team', 0);
...
$users = $this->readFromQuery(..., $team, ...);

so a plain user receives every account of every team of the instance in one response. The scoping concept exists (readFromQuery builds a team join), but it is only applied when the parameter is passed, and the parameter itself is unguarded: GET /api/v2/users?team=2 returns team 2’s roster to a user of team 1 (Users.php:331-336, no requester-membership predicate). The rosters are also the main way a plain user obtains memberships, since the directory response strips the teams key.

On the permissions side, the translate call of [I] also resolves the can-json’s teams and teamgroups arrays through equally unscoped lookups (Teams.php:188-199, TeamGroups.php:171-182), including teams that are not in the register list. The modal’s group select lists every teamgroup of the instance with its team (scope_teamgroups defaults to Everything).

D) Exploitation

The script of [I] D does both: GET /api/v2/teams, then GET /api/v2/users?team=N for each identifier, visible or not, and cross-references the rosters into user-to-team memberships. A canread naming every team and group identifier renders their names in the permissions modal, hidden teams included.

E) Consequences

The organizational chart of the instance, teams the operator hides on purpose first.

[III] Group mass-mail from the instance address by any team member

A) Overview

The same account can send an email to every member of any team group of the instance, from the instance’s official sender address, with its own address in Reply-To. With the address book of [I], that is a targeted internal-phishing channel that carries the instance’s trusted From.

B) Required data

The same account as [I], and a group identifier, which [II] provides.

C) Explanation

The group-email action skips the administrator gate for two of its actions: src/Models/Instance.php:47-49 exempts EmailTeam and EmailBookers from isSysadminOrExplode, and the target group is resolved with no membership check (Instance.php:79-82 into Email.php:288-290). Nothing ties the group to the requester’s team.

D) Exploitation

One authenticated request to the instance endpoint with the action, the group identifier, a subject and a body. Every member of the group receives the message from the instance sender.

E) Consequences

Internal phishing under the instance’s own address, to recipients chosen by team, by any member of any team.

[IV] Notes

A team whose members are all archived was indistinguishable from an empty one to the grant logic (TeamsHelper.php:147-149 counted non-archived members only), so the first person to register into a wound-down team became its administrator, validated on the spot, with no email to any team admin (Users.php:142 auto-validates any non-User group, :211-212 notifies the team admins, an empty list here). 6.1.0 counts archived memberships, so this route to an account is closed; the new-team route of [I] B remains, by design.

Any administrator of a team the victim merely shares can write the instance-wide account-validity columns (Users.php:808-810 puts valid_until in the reach of a common-team admin, gated only by canWriteOrExplode at :1035); the column is global and enforced at every login (UserLoginValidator.php:33-67), so the victim is locked out of the entire instance, not one team. This is unchanged in 6.1.0 and reported here for completeness.

We did not chase remote code execution: on a stock install the RCE candidates we checked do not fire.

[V] Fix

What we proposed, and what 6.1.0 does (PR #7685 with commit 5013a08, PR #7687, PR #7688, reviewed on the pull requests before the release):

[I] Mask and scope the resolver. Users::readNamesFromIds now returns the email masked unless the requester is the user, administers them, or is a sysadmin, with an anonymous default that fails closed. The can-json validator (Check.php) now requires positive integers. We had suggested dropping the email column from the lookup altogether; masking to the directory’s own standard is equivalent.

[II] Check membership on ?team= and hide hidden teams. The team parameter is guarded by a membership check (member, Admin of that team, or sysadmin); an Admin lists visible teams only, and a hidden team answers like a team that does not exist. Teams::readNamesFromIds, the teamgroup lookup and the group select filter hidden teams out unless the requester belongs to them.

[III] Re-gate the group email action. The target group must belong to the sender’s current team.

Notes. Archived memberships now count when deciding whether a team’s first registrant becomes its Admin.

[VI] Timeline

2026/10/07: Advisory sent to eLabFTW, GitHub report GHSA-qxg9-4cmh-xjgw opened
2026/10/31: Fixes published for review (PR #7685, #7687, #7688), three advisories agreed, one CVE each
2026/11/01: Fixes reviewed and approved
2026/11/16: Maintainer preparing eLabFTW 6.1.0
2026/11/18: GitHub reports GHSA-6xv4-h4g9-9vqc and GHSA-9779-f2ph-2ff9 opened, CVE requested for the three
2026/11/24: eLabFTW 6.1.0 released with the three fixes
2026/12/02: The three GitHub advisories published, CVE requested for [I] and [II]
2026/12/02: This page updated and opened to search engines

[VII] Author

John JEAN is a French security researcher, CTO at Wargan (https://www.wargan.com).
Follow me on X @johnjean

[VIII] PGP

My current PGP key is 0xDC3CB82BF0967AF0, you can get it on the Work with me page.