GHSA-rwrp-9823-p2xq
Flowise: Incomplete Credential Redaction Exposes Secrets via API
Summary
## Summary The `GET /api/v1/credentials/:id` endpoint decrypts stored credential data and returns it in the `plainDataObj` field of the API response. While a `redactCredentialWithPasswordType()` function masks fields defined with `type: 'password'` in their component schema, many credential types store highly sensitive data (database connection URLs with embedded passwords, Google service account JSON with RSA private keys, AWS access keys) in fields defined as `type: 'string'`. These string-type fields are returned in **full plaintext** without any redaction. Any authenticated user with `credentials:view` permission can retrieve the raw secrets of any credential in their workspace by calling this endpoint. ## Vulnerable Code ### Service Layer **`packages/server/src/services/credentials/index.ts`**, `getCredentialById()` (line 127): At line 138, the credential's encrypted data is decrypted: ```typescript const decryptedCredentialData = await decryptCredentialData( credential.encryptedData, credential.credentialName, appServer.nodesPool.componentCredentials ) ``` At lines 143-146, the decrypted data is attached to the response as `plainDataObj`: ```typescript const returnCredential: ICredentialReturnResponse = { ...credential, plainDataObj: decryptedCredentialData // { const plainDataObj = cloneDeep(decryptedCredentialObj) for (const cred in plainDataObj) { const inputParam = componentCredentials[componentCredentialName].inputs?.find( (inp) => inp.type === 'password' && inp.name === cred // " \ -d '{ "name": "MongoDB Production", "credentialName": "mongoDBUrlApi", "plainDataObj": { "mongoDBConnectUrl": "mongodb+srv://admin:[email protected]/myd
Affected packages
| Ecosystem | Package | Affected versions | Fixed versions |
|---|---|---|---|
| npm | flowise | — | 3.1.3 |
Remediation: Upgrade to 3.1.3 or later.
References
Includes data from the GitHub Advisory Database, licensed under CC-BY 4.0.