aboutsummaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-07 22:59:45 -0700
committerAdam Soltys <[email protected]>2026-08-07 23:29:25 -0700
commit582eab0d3e78d3c92b3fbf2d41d1845ca5761387 (patch)
tree3cb13c9698e2960c1b60071b0c3031952dbca46b /index.ts
parentf9e8638b2443ebf2da2e11eb12d1a8d60bf7c9d6 (diff)
downloadcoinos-server-582eab0d3e78d3c92b3fbf2d41d1845ca5761387.tar.gz
coinos-server-582eab0d3e78d3c92b3fbf2d41d1845ca5761387.zip
upload: require auth on /upload/:type; bump sharp past libvips CVEs (S7)
POST /upload/:type fed the raw uploaded image straight into sharp with no auth preValidation (unlike neighboring routes), reaching a native libvips decoder in the container that holds the JWT secret and CLN hot wallet. Require auth, and bump sharp 0.33.5 -> 0.35.3 (out of the vulnerable < 0.35.0 libvips range, GHSA-f88m-g3jw-g9cj et al.). Co-Authored-By: Claude Opus 4.8 <[email protected]>
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.ts b/index.ts
index 5f468454..f607ecb8 100644
--- a/index.ts
+++ b/index.ts
@@ -131,7 +131,7 @@ app.post("/2fa", auth, users.enable2fa);
app.post("/user", auth, users.update);
app.post("/delete", auth, users.deleteSelf);
app.post("/reset", optional, users.reset);
-app.post("/upload/:type", users.upload);
+app.post("/upload/:type", auth, users.upload);
app.get("/users/delete/:username", users.del);
app.post("/acl", users.acl);
app.post("/superuser", users.superuser);