n8n - 💡(How to fix) Fix Security: Credential Redaction Gap - Custom Auth Headers Not Redacted (N8N-CRED-001) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28221Fetched 2026-04-09 08:15:59
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×1labeled ×1mentioned ×1subscribed ×1

Credential Redaction Gap in Execution Logs

Root Cause

Credential Redaction Gap in Execution Logs

Fix Action

Fix / Workaround

Patched Versions

Pending fix

RAW_BUFFERClick to expand / collapse

GHSA Submission: N8N-CRED-001

Summary

Credential Redaction Gap in Execution Logs

Description

The HEADER_BLOCKLIST in GenericFunctions.ts is hardcoded and limited. Credentials with custom authentication headers (X-Custom-Auth, X-Secret-Token) would NOT be redacted in execution logs.

Severity

MEDIUM (CVSS 4.3)

CWE

CWE-200 (Information Exposure)

Affected Package/Repository

n8n-io/n8n

Affected File

n8n/packages/nodes-base/nodes/HttpRequest/GenericFunctions.ts

Vulnerable Version Range

All versions (HEADER_BLOCKLIST is hardcoded)

Patched Versions

Pending fix

Reproduction

Code analysis shows HEADER_BLOCKLIST only covers:

  • 'authorization'
  • 'x-api-key'
  • 'x-auth-token'
  • 'cookie'
  • 'proxy-authorization'
  • 'sslclientcert'

Custom credential properties with headers like X-Custom-Auth or X-Secret-Token pass through unredacted in execution logs.

Impact

Sensitive credentials stored in custom authentication headers may be exposed in execution logs, potentially leading to credential theft if logs are accessed by unauthorized parties.

Recommended Fix

Extend HEADER_BLOCKLIST to include common custom authentication header patterns, or implement a more flexible mechanism to detect and redact credential-like headers.

References

extent analysis

TL;DR

Extend the HEADER_BLOCKLIST in GenericFunctions.ts to include common custom authentication header patterns to prevent credential exposure in execution logs.

Guidance

  • Review the current HEADER_BLOCKLIST in GenericFunctions.ts to understand the existing redaction rules.
  • Identify common custom authentication header patterns used in your application, such as X-Custom-Auth and X-Secret-Token, and add them to the HEADER_BLOCKLIST.
  • Consider implementing a more flexible mechanism to detect and redact credential-like headers, rather than relying on a hardcoded list.
  • Verify the changes by testing the execution logs with various custom authentication headers to ensure they are properly redacted.

Example

// Example of extended HEADER_BLOCKLIST
const HEADER_BLOCKLIST = [
  'authorization',
  'x-api-key',
  'x-auth-token',
  'cookie',
  'proxy-authorization',
  'sslclientcert',
  'x-custom-auth',
  'x-secret-token',
];

Notes

The recommended fix is pending, and the exact implementation details may vary depending on the specific requirements of your application. It's essential to carefully review and test any changes to ensure they do not introduce unintended consequences.

Recommendation

Apply a workaround by extending the HEADER_BLOCKLIST to include common custom authentication header patterns, as a temporary solution until a more comprehensive fix is available. This will help mitigate the risk of credential exposure in execution logs.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING