GHSA-rwrp-9823-p2xq: Flowise Incomplete Credential Redaction Exposes Secrets Vulnerability
MODERATEGHSA-rwrp-9823-p2xq is a MODERATE (CVSS 6.5) incomplete credential redaction exposes secrets vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Flowise libraries in the npm ecosystem. The issue involves incomplete credential redaction exposes secrets via api. Remediation is available by upgrading affected packages to version 3.1.3.
GHSA-rwrp-9823-p2xq at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-rwrp-9823-p2xq
To remediate this vulnerability, upgrade all affected Flowise dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install flowise@3.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls flowise
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-rwrp-9823-p2xq, inspect your project dependencies using npm:
npm ls flowise
Analyze the terminal output to locate any version of Flowise in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.3), your application is affected.
Note: The npm ls flowise command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Flowise, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-rwrp-9823-p2xq Affected Flowise Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flowise
|
npm |
< 3.1.3
|
3.1.3
|
References
Frequently Asked Questions
What is GHSA-rwrp-9823-p2xq?
Which Flowise versions are affected?
What version fixes GHSA-rwrp-9823-p2xq?
Is flowise affected?
What is the CVSS score of GHSA-rwrp-9823-p2xq?
What CWE is associated with GHSA-rwrp-9823-p2xq?
How can I check npm dependencies for GHSA-rwrp-9823-p2xq?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rwrp-9823-p2xq",
"modified" : "2026-08-04T17:57:35Z",
"published" : "2026-08-04T17:57:35Z",
"aliases" : [ ],
"summary" : "Flowise: Incomplete Credential Redaction Exposes Secrets via API",
"details" : "## Summary\n\nThe `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.\n\nAny authenticated user with `credentials:view` permission can retrieve the raw secrets of any credential in their workspace by calling this endpoint.\n\n## Vulnerable Code\n\n### Service Layer\n\n**`packages/server/src/services/credentials/index.ts`**, `getCredentialById()` (line 127):\n\nAt line 138, the credential's encrypted data is decrypted:\n\n```typescript\nconst decryptedCredentialData = await decryptCredentialData(\n credential.encryptedData,\n credential.credentialName,\n appServer.nodesPool.componentCredentials\n)\n```\n\nAt lines 143-146, the decrypted data is attached to the response as `plainDataObj`:\n\n```typescript\nconst returnCredential: ICredentialReturnResponse = {\n ...credential,\n plainDataObj: decryptedCredentialData // <-- decrypted secrets in response\n}\n```\n\nAt line 147, only `encryptedData` is stripped, leaving `plainDataObj` intact:\n\n```typescript\nconst dbResponse: any = omit(returnCredential, ['encryptedData'])\n```\n\n### Incomplete Redaction\n\n**`packages/server/src/utils/index.ts`**, `redactCredentialWithPasswordType()` (line 1697):\n\n```typescript\nexport const redactCredentialWithPasswordType = (\n componentCredentialName: string,\n decryptedCredentialObj: ICredentialDataDecrypted,\n componentCredentials: IComponentCredentials\n): ICredentialDataDecrypted => {\n const plainDataObj = cloneDeep(decryptedCredentialObj)\n for (const cred in plainDataObj) {\n const inputParam = componentCredentials[componentCredentialName].inputs?.find(\n (inp) => inp.type === 'password' && inp.name === cred // <-- only 'password' type\n )\n if (inputParam) {\n plainDataObj[cred] = REDACTED_CREDENTIAL_VALUE\n }\n }\n return plainDataObj\n}\n```\n\nThis function **only** redacts fields where `inp.type === 'password'`. Fields with `type: 'string'` are returned verbatim, even when they contain secrets.\n\n### Credential Definitions Storing Secrets in String-Type Fields\n\n| Credential | Field | Type | Contains |\n|---|---|---|---|\n| `mongoDBUrlApi` | `mongoDBConnectUrl` | `string` | `mongodb+srv://user:password@host/db` |\n| `googleVertexAuth` | `googleApplicationCredential` | `string` | Full service account JSON with RSA private key |\n| `postgresUrl` | `postgresUrl` | `string` | `postgresql://user:password@host/db` |\n| `redisCacheUrlApi` | `redisUrl` | `string` | `redis://user:password@host:port` |\n| `awsApi` | `awsKey` | `string` | AWS Access Key ID |\n| `langfuseApi` | `langFusePublicKey` | `string` | Langfuse API public key |\n| `httpBasicAuth` | `basicAuthUsername` | `string` | HTTP Basic Auth username |\n\nThere are 60+ credential definitions in `packages/components/credentials/`, many with sensitive string-type fields.\n\n## Proof of Concept\n\n### Environment\n\n- Flowise v3.0.13 (`flowiseai/flowise:latest` Docker image)\n- Authenticated as admin user via enterprise auth\n\n### Steps to Reproduce\n\n1. Start Flowise and log in as any user with `credentials:view` permission.\n2. Create a MongoDB credential with a connection URL containing embedded credentials:\n\n```bash\ncurl -X POST \"http://TARGET:3000/api/v1/credentials\" \\\n -H \"Content-Type: application/json\" \\\n -H \"x-request-from: internal\" \\\n -H \"Cookie: token=<jwt-token>\" \\\n -d '{\n \"name\": \"MongoDB Production\",\n \"credentialName\": \"mongoDBUrlApi\",\n \"plainDataObj\": {\n \"mongoDBConnectUrl\": \"mongodb+srv://admin:SuperSecretPassword123@cluster0.abc123.mongodb.net/mydb\"\n }\n }'\n```\n\n3. Retrieve the credential by ID:\n\n```bash\ncurl -X GET \"http://TARGET:3000/api/v1/credentials/<credential-id>\" \\\n -H \"x-request-from: internal\" \\\n -H \"Cookie: token=<jwt-token>\"\n```\n\n### Observed Result\n\nThe API returns the MongoDB connection URL in **full plaintext**, including the embedded password:\n\n```json\n{\n \"id\": \"e9543cad-8c0c-422e-9990-090c3b1dc3ab\",\n \"name\": \"MongoDB Production\",\n \"credentialName\": \"mongoDBUrlApi\",\n \"createdDate\": \"2026-02-07T17:35:29.000Z\",\n \"updatedDate\": \"2026-02-07T17:35:29.000Z\",\n \"plainDataObj\": {\n \"mongoDBConnectUrl\": \"mongodb+srv://admin:SuperSecretPassword123@cluster0.abc123.mongodb.net/mydb\"\n }\n}\n```\n\nThe same test with a Google Vertex Auth credential returned the **complete service account JSON including the RSA private key** in plaintext:\n\n```json\n{\n \"id\": \"f7768444-a4fc-4fa3-8e5e-d0d4df89fb56\",\n \"name\": \"Google Vertex Auth\",\n \"credentialName\": \"googleVertexAuth\",\n \"plainDataObj\": {\n \"googleApplicationCredential\": \"{\\\"type\\\":\\\"service_account\\\",\\\"private_key\\\":\\\"-----BEGIN RSA PRIVATE KEY-----\\\\nMIIEpAIBAAKCAQEA0Z3VS5JJcds3xfn/ygWep4PAtGoL3VBpFe97XRQFQB\\\\n-----END RSA PRIVATE KEY-----\\\\n\\\",\\\"client_email\\\":\\\"mybot@my-project-123.iam.gserviceaccount.com\\\"}\",\n \"projectID\": \"my-project-123\"\n }\n}\n```\n\nFor comparison, an OpenAI API key (where the field is typed as `password`) was **correctly redacted**:\n\n```json\n{\n \"plainDataObj\": {\n \"openAIApiKey\": \"_FLOWISE_BLANK_07167752-1a71-43b1-\"\n }\n}\n```\n\nThis confirms the redaction is only applied to `password`-type fields, leaving `string`-type fields fully exposed.\n\n## Impact\n\n- **Database credential theft**: MongoDB, PostgreSQL, Redis, MySQL connection URLs with embedded passwords are returned in full plaintext. An attacker can use these to directly access production databases.\n- **Cloud service account compromise**: Google service account JSON with RSA private keys is returned in plaintext, enabling full impersonation of the service account across Google Cloud.\n- **AWS key exposure**: AWS Access Key IDs stored in `string`-type fields are exposed, enabling enumeration of active AWS credentials.\n- **Lateral movement**: Stolen credentials enable pivoting from the Flowise instance to connected cloud services, databases, and APIs.\n- **Multi-user workspace risk**: In multi-user deployments, any user with `credentials:view` permission can harvest all workspace credentials via the API.\n\n## Remediation\n\n1. Apply `redactCredentialWithPasswordType()` to **all** sensitive credential fields, not just those typed as `password`. Any field containing secrets (connection strings, JSON credentials, access keys) should be redacted.\n2. Consider never returning `plainDataObj` in API responses. The UI should use masked previews (e.g., `mongodb+srv://admin:****@cluster0...`) instead of full values.\n3. Re-type sensitive credential fields from `string` to `password` in component credential definitions to ensure they are covered by the existing redaction logic.\n4. Add a separate `secret: true` flag to credential field definitions to explicitly mark sensitive fields regardless of their input type.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "flowise"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-rwrp-9823-p2xq"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FlowiseAI/Flowise"
}, {
"type" : "WEB",
"url" : "https://github.com/FlowiseAI/Flowise/releases/tag/flowise@3.1.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-04T17:57:35Z",
"nvd_published_at" : null
}
}