Summary
NocoDB's data source read handler could disclose decrypted TLS client private keys, certificates, and CA material to authenticated base Viewers. If a Viewer can read a data source configured with these credentials, they may be able to connect directly to the external database, outside NocoDB's permission checks.
Affected context
The issue affects NocoDB deployments before 2026.09.0 when a base has a data source configured with TLS client credentials. The source read handler masked the connection password but did not mask the decrypted private key, client certificate, or CA, making those values available to authenticated base Viewers who could read the data source.
Exploit preconditions
- Attack surface: Reading a base's data source through NocoDB
- Required access: An authenticated account with base Viewer access and permission to read the relevant data source
- Trigger point: A request that returns the data source details
- Why exploitation is possible: The response masks the connection password but may expose decrypted TLS credential material
Why this happens
The source read handler applied incomplete redaction to sensitive connection settings: it masked the password but left TLS private key, certificate, and CA values exposed. This is an insufficient protection of credentials, mapping to CWE-522: Insufficiently Protected Credentials. Sensitive secrets were returned to a role that did not need them to view base data.
Potential impact
- An authenticated Viewer may obtain TLS client credentials.
- The credentials could allow a party to attempt a direct connection to the external database, subject to network access and database-side authorization.
- Direct database access could bypass NocoDB permission checks and may expose or enable modification of data.
- Exposed credentials may require rotation and could affect other systems if reused.
General mitigation guidance
Defensive patterns focus on minimizing secret exposure and separating data viewing from credential access:
- Return only the data source fields needed for the caller's task, and redact or omit all secret material by default.
- Keep private keys, certificates, and other credentials in a dedicated secret store rather than exposing decrypted values in general-purpose responses.
- Apply authorization checks to secret access independently of base viewing permissions.
- Limit the database privileges and network reach of credentials used by the application.
- Review and rotate credentials that may have been exposed, using established secret-management procedures.
How teams detect issues like this
High-level detection approaches include:
- Review source read handlers and serializers for incomplete redaction of passwords, private keys, certificates, and other secret fields.
- Use static analysis or code review checks to flag API responses that serialize configuration objects containing credentials.
- Test authorization policies to verify that Viewer roles cannot retrieve secrets they do not need.
- Monitor API responses and access logs for data source reads by unexpected accounts or at unusual rates, while avoiding logging secret values.
- Enforce response-schema and secret-handling policies in CI and API review workflows.

