A webhook sends its stored secret headers to a changed URL, and a NUL byte in an answer repeats the delivery

Open
#3,299 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp, postgresql

Research direction

Start with WebhookService.cs around lines 139, 353, and 424 to trace how masked headers are retained when a URL changes. Then read WebhookSender.cs around lines 96–107 and WebhookDeliveryJob.cs around lines 68–78 and 186–207 to follow answer storage and retry handling. Add regression tests for both acceptance cases and verify that a 2xx response containing a NUL byte is recorded as one successful delivery across providers.

Written by the indexing model from the issue text.

Description

plugin security type:bug

Problem

  1. A kept *** header follows a changed URL. src/plugins/FluentCMS.Plugins.Webhooks/WebhookService.cs:139,353 keep the stored value for a header sent as *** without checking that the URL is unchanged (applied at :424). A webhooks.manage holder can repoint the webhook to a host of their own and receive headers that are write-only.
  2. An answer containing a NUL byte is delivered six times and dead-lettered on PostgreSQL. WebhookSender.cs:96-107 stores up to 4 KB of the answer as received, and WebhookDeliveryJob.cs:68-78 writes it to a text column, which PostgreSQL refuses for 0x00. The job throws after a 2xx, TakeOverAsync (:186-207) marks the attempt interrupted and schedules the next. The receiver gets duplicates, a WebhookDeadEvent is raised, and the webhook is disabled when DisableAfter is set. This was read from the code, not reproduced.

Proposal

  • Refuse *** when the scheme, host or port of the URL changes; the caller must send the value again.
  • Strip control characters from the stored excerpt.

Done together with #3268, which changes the same delivery job.

Acceptance

  • An update that changes the host and keeps a header as *** is refused with a problem naming the header
  • The same update with the URL unchanged, or only its path changed, keeps the header
  • A 2xx answer containing 0x00 is recorded as one successful delivery on every provider
  • Tests for each, failing before the fix

Found in the code review of 17 Nov 2026.

Dominant language
C#
Stars
569
Forks
107
Avg merge
2h 49m
Merged PRs (30d)
397

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fluentcms/FluentCMS

All issues in fluentcms/FluentCMS

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.