diff options
| author | Adam Soltys <[email protected]> | 2026-05-17 23:42:28 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-05-17 23:42:28 -0700 |
| commit | ca4bdc84f1eac1859044639ffa16bac9aa8fce1b (patch) | |
| tree | c4625ee4d7512edb4e877bb94b332a8c832ec1e5 | |
| parent | 6992af9bc03822dea71b59604f03d34a91511264 (diff) | |
| download | coinos-server-ca4bdc84f1eac1859044639ffa16bac9aa8fce1b.tar.gz coinos-server-ca4bdc84f1eac1859044639ffa16bac9aa8fce1b.zip | |
remove /gateway endpoint
Unauthenticated arbitrary db.set abuse vector. Exploited on the master
deployment to inflate user balances and override safety controls in real
time, leading to a hot-wallet drain. Route and handler both fully
removed; if a webhook-by-short-channel-id mapping is ever needed again
it must be rebuilt with auth + SCID format validation + webhook URL
validation + per-user ownership check.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
| -rw-r--r-- | index.ts | 1 | ||||
| -rw-r--r-- | routes/payments.ts | 8 |
2 files changed, 0 insertions, 9 deletions
@@ -104,7 +104,6 @@ app.post("/take", auth, payments.take); app.post("/print", auth, payments.print); app.post("/send/:lnaddress/:amount", auth, payments.lnaddress); app.post("/send", auth, payments.internal); -app.post("/gateway", payments.gateway); app.post("/bump", auth, payments.bump); app.get("/decode/:bolt11", payments.decode); app.post("/fetchinvoice", payments.fetchinvoice); diff --git a/routes/payments.ts b/routes/payments.ts index 56dcad21..81698e10 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -749,14 +749,6 @@ export default { } }, - async gateway(c) { - const body = await c.req.json(); - const { short_channel_id, webhook } = body; - - await s(short_channel_id, webhook); - return c.json({ ok: true }); - }, - async bump(c) { const body = await c.req.json(); const { id } = body; |
