CustomAlert can survive user deletion and become associated with a recreated login
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading the CustomAlerts.addAlert flow alongside UsersManager.deleteUser and its cleanup handling. Review CustomAlerts.getAlerts and Processor::shouldBeProcessed to understand how residual alerts become visible after login reuse. Done means a chosen lifecycle or concurrency safeguard prevents the reproduced deletion-and-recreation sequence, with a regression test covering deletion during addAlert.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
A CustomAlert can remain in the database after its owning user is deleted if an addAlert request completes immediately after the UsersManager.deleteUser cleanup callback.
Because alerts are associated with the textual login value, recreating a user with the same login can make the residual alert visible to the new account once it has access to the same site.
This was previously reported through Matomo's HackerOne program and was assessed as a regular lifecycle bug rather than a security vulnerability. The Matomo team suggested filing it here for hardening.
Root cause
CustomAlerts removes existing alerts when handling UsersManager.deleteUser.
However, an already-authorized CustomAlerts.addAlert request can still complete its database insert after that cleanup has run.
The alert row is associated using the login string rather than an immutable user identity, and there is currently no defensive cleanup when the same login is created again.
Reproduction
Tested locally with:
- Matomo 5.13.0
- CustomAlerts 5.3.3
- self-hosted Docker environment
Sequence:
- Create user
race-userwith access to a test site. - Start a
CustomAlerts.addAlertrequest as that user. - Concurrently delete
race-user. - Arrange the interleaving so deletion cleanup executes before the alert insert finishes.
- Recreate
race-userwith a different password/email and restore access to the same site. - Call
CustomAlerts.getAlerts. - The newly created account can see the residual alert created by the previous identity.
The behavior was reproduced multiple times in a local environment.
Expected behavior
Deleting a user should guarantee that no alert belonging to the deleted identity can later become associated with a new account that happens to reuse the same login.
Possible fixes
Some possible approaches:
- associate alerts with an immutable user identifier instead of only the login string;
- serialize alert creation against user deletion;
- verify that the same user identity still exists before committing the alert insert;
- defensively remove residual alerts when a login is created/reused;
- add a concurrency regression test covering deletion during
addAlert.
Additional note
The residual alert is not processed while the login lacks site access, because Processor::shouldBeProcessed() checks current access. The issue is specifically the lifecycle persistence and reassociation of the alert when the same login is later recreated.
- Lingua principale
- PHP
- Stelle
- 17
- Fork
- 24
- Merge medio
- 1g 6h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di matomo-org/plugin-CustomAlerts
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
matomo-org/plugin-CustomAlerts#170 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
matomo-org/plugin-CustomAlerts#142 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
matomo-org/plugin-CustomAlerts#134 · 1 commento ·
-
c: Privacy enhancement triaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
matomo-org/plugin-CustomAlerts#119 · 1 commento ·
Tutte le issue di matomo-org/plugin-CustomAlerts
Issue simili
-
ServiceMapMissingAnalyser reads @method in docblock prose as a tag and reports a phantom accessorApertaagent-ready area:static-analysis bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
gacela-project/gacela#1050 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
grokability/massdriver-server#38 ·
I maintainer di solito rispondono entro 1 giorno
-
bug review needed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
OpenMage/magento-lts#5816 ·
I maintainer di solito rispondono entro 2 giorni
-
priority:low type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
crazy-goat/rabbit-stream#958 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pterodactyl/panel#7310 ·
I maintainer di solito rispondono entro 1 giorno