mirror of
https://github.com/koel/koel.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #2134] [Bug]: Unexpected user accounts auto-created with registration disabled (Koel v7.15.1, Postgres) #1097
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#1097
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @volcs0 on GitHub (Oct 9, 2025).
Original GitHub issue: https://github.com/koel/koel/issues/2134
Originally assigned to: @phanan on GitHub.
Read the Troubleshooting guide.
Reproduction steps
Summary
Koel is creating multiple user accounts automatically without any registration requests from clients. Registration is disabled. All accounts were created within the same second and look like Faker/test data.
Environment
Koel image: phanan/koel:latest (docker history shows KOEL_VERSION_REF=v7.15.1)
Database: Postgres 13 (separate container, volume-backed)
Compose (relevant bits):
Koel .env inside container (sanitized):
Network/exposure: Koel is only bound to LAN and accessed via Cloudflare WARP (private routing). No public hostname or reverse proxy to this instance. iptables DOCKER-USER chain drops unsolicited traffic; LAN, Tailscale, and docker bridge are explicitly allowed.
What happened
At 2025-10-09 10:48:52–53 (UTC) five users were inserted into users.
Emails look like autogenerated test data (e.g. meta.berge@gleichner.com, macejkovic.lee@heaney.biz, talon48@metz.com, etc.).
invited_by_id is NULL; no SSO fields set.
No corresponding HTTP POSTs to /register, /api/users, or similar in Apache/Laravel logs at that time.
Expected behavior
What I expected
With ALLOW_REGISTRATION=false and no public exposure, I would not expect any new users to be created unless I explicitly invite or create them as admin.
Actual behavior
Evidence
SQL (run inside the Postgres container):
Example result (sanitized):
Logs
Web server/app logs around that time:
No POSTs to any registration or user-creation endpoints.
Only periodic healthchecks (GET /sw.js) and normal GETs while I was browsing the UI later.
Example filtered log snippets:
Entrypoint & seeds:
Container entrypoint is very short and doesn’t run seeds:
Grepping for db:seed, seed, or demo inside the image didn’t show anything obvious.
What I’ve ruled out
External attacker creating accounts: would expect HTTP POSTs and varied timestamps/IPs; there are none.
Public exposure via Cloudflare: this instance has no public hostname; Cloudflare WARP is used only for private routing.
Manual invites: invited_by_id is NULL on all new rows.
Hypothesis / Questions
Is there any scheduled job, migration, or first-run path in v7.15.1 that can create demo/test users or bootstrap accounts (especially with Faker emails)?
Is there a codepath that may create users when ALLOW_REGISTRATION=false (e.g., organization bootstrap, SSO placeholders, or a background sync)?
Could the packaged release tar include compiled assets or a script that triggers user creation on boot?
Temporary mitigations
Set ALLOW_REGISTRATION=false explicitly and confirmed in container.
Removed the bogus users from users.
Network remains private; no public ingress to this Koel instance.
Anything I can add to help?
Happy to run any additional diagnostics you suggest. I can also set up a DB trigger to capture inet_client_addr() / application_name on INSERT INTO users if that helps pinpoint the caller.
Koel version
7.15.1
How did you install Koel?
Official Docker image
Additional information
@phanan commented on GitHub (Oct 9, 2025):
Hmm. First thing first, Koel doesn't have any registration mechanism, so ALLOW_REGISTRATION shouldn't have any effects. I'll take a closer look later.
@LucasLaprad commented on GitHub (Dec 17, 2025):
I too have been experiencing this, an example of the random accounts from this morning are below:
Running 8.1.0 on Rocky Linux hosted behind nginx. This instance is hosted publicly, albeit behind a self hosted MFA portal.
@sgnl05 commented on GitHub (Dec 18, 2025):
Same here, two random accounts:
Running 8.1.0 on Ubuntu, hosted behind HAProxy. Instance is exposed to the internet. I'm the only admin and use a randomly generated password containing >30 characters.
@sgnl05 commented on GitHub (Dec 18, 2025):
Looks like
php artisan koel:doctortriggers creation of a fake account@phanan commented on GitHub (Dec 18, 2025):
Not that I can reproduce:
@gjermundksat commented on GitHub (Dec 19, 2025):
Any logs I can check for debugging?
Here's my output when I run tinker and koel:doctor:
@phanan commented on GitHub (Jan 10, 2026):
I still can't reproduce the bug, but I've changed
koel:doctornot to use model factories: #2195. Hopefully this will fix the issue.