#18777: fix: LINE webhook acknowledges events before processing and drops failur
stale
size: S
trusted-contributor
Cluster:
Webhook Security Enhancements
## Fix Summary
The LINE webhook handlers return HTTP 200 before event processing finishes, then catch processing errors and only log them. This causes irreversible message loss because LINE sees success and does not retry failed deliveries. The pattern exists in two independent code paths.
## Issue Linkage
Fixes #18775
## Security Snapshot
- CVSS v3.1: 8.2 (High)
- CVSS v4.0: 8.8 (High)
## Implementation Details
### Files Changed
- `src/line/webhook-node.test.ts` (+22/-1)
- `src/line/webhook-node.ts` (+6/-9)
- `src/line/webhook.test.ts` (+29/-0)
- `src/line/webhook.ts` (+4/-7)
### Technical Analysis
Root cause: The LINE webhook handlers return HTTP 200 before event processing finishes, then catch processing errors and only log them. The vulnerable behavior originates in `src/line/webhook.ts:74-83` and `src/line/webhook-node.ts:96-107`. When the documented execution path is triggered, security controls fail to enforce the expected boundary. Fix approach: enforce secure defaults on this path, validate/guard untrusted inputs at the boundary, and add regression tests that cover the failing scenario.
## Validation Evidence
- Command: `pnpm build && pnpm check && pnpm test`
- Status: passed
## Risk and Compatibility
non-breaking; no known regression impact
## AI-Assisted Disclosure
- AI-assisted: yes
- Model: GPT-5.3-Codex
Most Similar PRs
#17182: security(line): fail closed when webhook token/secret are missing
by davidahmann · 2026-02-15
72.2%
#17593: security: fail closed when LINE webhook secret is missing
by davidahmann · 2026-02-15
71.7%
#23621: fix(LINE): keep startAccount promise alive to prevent auto-restart ...
by ttakanawa · 2026-02-22
68.9%
#16619: fix(line): allow signatureless empty-events webhook verification
by harshang03 · 2026-02-14
68.8%
#5834: fix(line): add timeout and size limit to readRequestBody to prevent...
by hclsys · 2026-02-01
66.5%
#21956: fix(line): block monitorLineProvider on abort signal to prevent cra...
by lailoo · 2026-02-20
65.1%
#20775: fix(security): OC-10 add webhook payload schema validation to preve...
by aether-ai-agent · 2026-02-19
64.9%
#11804: fix(webhook): return 503 from health endpoints when last processing...
by coygeek · 2026-02-08
64.8%
#21197: Security/Voice Call: enforce exact webhook path matching
by bmendonca3 · 2026-02-19
64.1%
#21531: Security/Webhooks: block signed replay for Nextcloud, Google Chat, ...
by bmendonca3 · 2026-02-20
64.0%