The Neko Music platform (including Slothify and Saavn Audio Services) is designed with zero-knowledge privacy, client data ownership, and defensive engineering at its core.
We take the security of this project and the privacy of our users very seriously. If you discover a security vulnerability, please do NOT open a public GitHub issue.
- Email your findings directly to the lead maintainer:
- Contact: Purvesh Shinde
- Email: shindepurvesh007@gmail.com
- Include in your report:
- A detailed description of the vulnerability.
- Proof-of-concept (PoC) code or step-by-step reproduction instructions.
- The potential impact on users or host infrastructure.
- Response SLA: You will receive an acknowledgment within 48 hours, followed by regular progress updates until a patch is released.
- Coordinated Disclosure: We request that you give us reasonable time to investigate and address the vulnerability before making any public disclosure.
Slothify implements a zero-knowledge encryption architecture for all persistent user data stored in the database.
┌──────────────────────────────────────────────┐
│ User Secret │
│ (Account Password / 12-Word Key) │
└──────────────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────────────┐
│ Asynchronous scrypt KDF │
│ crypto.scrypt(userId + secret, salt, 32) │
│ (Executed in libuv worker threadpool) │
└──────────────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────────────┐
│ Derived AES-256 Key │
│ (32-byte Binary Buffer) │
└──────────────┬───────────────────────────────┘
│
┌───────────────┴───────────────┐
│ │
▼ ▼
┌─────────────────────────┐ ┌──────────────────────────┐
│ LRU Key Cache │ │ AES-256-GCM Engine │
│ - Max 500 entries │ │ - 12-byte random IV │
│ - 1-hour TTL │ │ - 16-byte auth tag │
│ - Ephemeral HMAC-SHA256│ │ - Ciphertext output │
│ - In-flight deduplication └────────────┬─────────────┘
└─────────────────────────┘ │
▼
┌──────────────────────────┐
│ MongoDB Document │
│ { ciphertext, iv, tag } │
└──────────────────────────┘
- Algorithm:
crypto.scryptwith cost parameters yielding ~25-30ms derivation time. - Non-Blocking libuv Execution: Key derivation is executed asynchronously using libuv worker threads (
UV_THREADPOOL_SIZE), ensuring the Node.js event loop remains 100% responsive and non-blocking for concurrent I/O. - Salt: Deterministic, domain-isolated salt (
slothify_salt).
To prevent redundant CPU-heavy derivations when a user loads a 50-track playlist:
- Capacity: Bounded to at most 500 entries to prevent memory exhaustion.
- Expiration: Strict 1-hour time-to-live (
ttlMs = 3,600,000). - Memory Bound: Only 32-byte derived key Buffers are stored. Plaintext track metadata and decrypted audio streams are NEVER cached in memory.
- Defensive Buffer Immutability: Returns defensive
Buffer.from()copies on read and creates defensive copies on write, ensuring callers cannot mutate cached keys. - Keyed Ephemeral HMAC: Cache keys are generated using an ephemeral
CACHE_HMAC_SECRET(crypto.randomBytes(32)) generated in RAM on server boot. This prevents offline secret cracking from memory dumps. - In-Flight Deduplication: Concurrent requests for the same user key collapse onto a single
Promise<Buffer>using an in-flight derivation map, eliminating thundering herd threadpool spikes.
To prevent data loss across multi-environment deployments, decryptPayload attempts decryption using the primary server secret, then cleanly falls back sequentially across all valid historical secrets:
process.env.ENCRYPTION_SECRET'slothify_zero_knowledge_super_secret_pepper_2026''slothify-zero-knowledge-fallback-secret-2026''slothify-zero-knowledge-fallback-secret'
Payloads that fail authentication with all candidate secrets return null safely without crashing the application.
Slothify supports zero-friction, private account creation:
- No Email or Phone: Users register with only a
usernameandpassword. - 12-Word Recovery Passphrase: Generated upon registration (
generateRecoveryPassphrase()) using cryptographically secure random bytes mapped to a curated mnemonic wordlist. - Hashed Verification: The server only stores
bcrypt.hash(password)andbcrypt.hash(recoveryPassphrase). Centralized master recovery keys do not exist. - Password Reset: Users can reset their password exclusively by presenting their valid 12-word recovery passphrase. If a user loses both their password and recovery key, their encrypted data cannot be decrypted by anyone (including the developers).
- Identifier Validation:
validateArtistId()validates incoming artist identifiers against strict regex patterns, immediately blocking queries containing<script>,SELECT,DROP TABLE, or suspicious control characters. - Mongoose Parameterization: All MongoDB queries use parameterized Mongoose document queries (
findOne,find,deleteMany), completely immune to NoSQL injection. - HTML Entity Decoding: Track and album titles returned from public scrapers are sanitized with
decodeHtmlEntities()to prevent Stored XSS attacks in client browsers.
- All dynamic username lookups use escaped regex metacharacters:
const escaped = username.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
- No Media Hosting: Neither Slothify nor the Saavn Audio Services extension hosts, uploads, or stores copyrighted audio or video files.
- Direct Source Streaming: Audio resolution endpoints (
/api/audio/resolveand Cloudflare Workers) resolve direct, publicly accessible CDN stream URLs hosted on JioSaavn and Google/YouTube servers. Audio data streams directly from source CDNs to the user's browser without passing through host storage. - Third-Party Trademarks: All artist names, track titles, and album artworks remain the intellectual property of their respective creators and copyright holders.
| Data Category | Collected? | Storage Location | Retention / Policy |
|---|---|---|---|
| Email / Phone / Identity | NO | None | We never ask for or store personal identification. |
| IP Addresses | NO | None | No persistent IP access logging or tracking. |
| Analytics / Telemetry | NO | None | Zero third-party tracking scripts, pixels, or telemetry. |
| Playlists & Liked Songs | YES | MongoDB (Encrypted) | Encrypted via AES-256-GCM. Decryptable only with user credentials. |
| Listening History | YES | MongoDB (Plaintext) | Strictly capped at 100 entries. Can be purged anytime via Settings. |
| Guest / Offline Data | YES | Client localStorage |
Stored exclusively on user's device. Never sent to cloud servers. |
Users have the right to permanently purge their account and all associated encrypted database records at any time via the Settings -> Delete Account interface.