GHSA-QQF6-CFW5-8CJ2
Unauthenticated Full Log Archive Download on `/skServer/ziplogs`
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 2.33.0 | signalk-server · -60 d desde divulgación | |
| Divulgación | Publicada | GHSA-QQF6-CFW5-8CJ2 divulgada · CVSS 7.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### Summary
The `GET /skServer/ziplogs` endpoint in `src/interfaces/logfiles.js` is not protected by
any authentication or authorization middleware. As a result, an unauthenticated remote
attacker can download a complete `.zip` archive of all server log files with a single HTTP
GET request.
### Details
In `src/interfaces/logfiles.js`, authentication was intended to be added to log file
endpoints (commit `67ab790c`):
```javascript
function mountApi(app) {
app.securityStrategy.addAdminMiddleware(`${SERVERROUTESPREFIX}/logfiles/`)
app.get(`${SERVERROUTESPREFIX}/logfiles/`, function (req, res) { ... })
app.get(`${SERVERROUTESPREFIX}/logfiles/:filename`, function (req, res) { ... })
app.get(`${SERVERROUTESPREFIX}/ziplogs`, function (req, res) {
const boatName = app.config.vesselName || app.config.vesselMMSI || ''
const sanitizedBoatName = boatName.replace(/\W/g, '_')
const zipFileName = `sk-logs-${sanitizedBoatName}-${moment().format('YYYY-MM-DD-HH-
mm')}`
sendZip(res, {
files: [{ path: getFullLogDir(app), name: zipFileName }],
filename: zipFileName + '.zip'
})
})
}
• app.securityStrategy.addAdminMiddleware is only bound to ${SERVERROUTESPREFIX}/logfiles/.
• Because Express path prefix matching does not match /skServer/ziplogs to
/skServer/logfiles/, the /skServer/ziplogs route is completely unprotected.
• Neither the route handler nor sendZip (src/zip.ts) perform any authentication or
permission verification.
• In addition, /ziplogs is not listed in src/tokensecurity.ts.
Steps to Reproduce
Even when token security is enabled on the server, send a request without any
authentication tokens:
curl -i -X GET http://localhost:3000/skServer/ziplogs -o leaked_logs.zip
• Expected behavior: Returns 401 Unauthorized or 403 Forbidden.
• Actual behavior: Returns 200 OK with Content-Type: application/zip and streams the full
zip archive of the server's entire log directory.
Impact
• Sensitive Vessel Data Disclosure: Server logs typically contain historical vessel track
data (real-time and past GPS coordinates, speed, depth), exposing vessel movements and
physical location privacy.
• System Diagnostics Exposure: Logs reveal internal network client IPs, authentication
failure records, NMEA bus device identifiers, and debug error traces.
Proposed Fix
Add the missing admin middleware to ${SERVERROUTESPREFIX}/ziplogs in
src/interfaces/logfiles.js:
--- a/src/interfaces/logfiles.js
+++ b/src/interfaces/logfiles.js
@@ -31,6 +31,7 @@ module.exports = function (app) {
function mountApi(app) {
app.securityStrategy.addAdminMiddleware(`${SERVERROUTESPREFIX}/logfiles/`)
+ app.securityStrategy.addAdminMiddleware(`${SERVERROUTESPREFIX}/ziplogs`)
app.get(`${SERVERROUTESPREFIX}/logfiles/`, function (req, res) {
Optionally, include /ziplogs in src/tokensecurity.ts admin routes list:
--- a/src/tokensecurity.ts
+++ b/src/tokensecurity.ts
@@ -816,6 +816,7 @@ function tokenSecurityFactory(
'/backup',
'/restore',
'/providers',
+ '/ziplogs',
'/vessel',
'/serialports'
].forEach((p) =>
---
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmsignalk-server |
Corregida | 2.33.0 | -60 d | 2.37.0 no afectada |
2.33.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/SignalK/signalk-server/security/advisories/GHSA-qqf6-cfw5-8cj2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
