Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix: prevent auth log injection
Alfredo Lopezd26216c66f74
diff --git a/workflow-recipes/package-lock.json b/workflow-recipes/package-lock.jsonindex bf17913bc..4d19bb875 100644--- a/workflow-recipes/package-lock.json+++ b/workflow-recipes/package-lock.json@@ -1,12 +1,12 @@{"name": "workload-recipes-controller",- "version": "0.1.264",+ "version": "0.1.265","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "workload-recipes-controller",- "version": "0.1.264",+ "version": "0.1.265","license": "SEE LICENSE IN LICENSE","dependencies": {"@aws-sdk/client-s3": "^3.1009.0",diff --git a/workflow-recipes/package.json b/workflow-recipes/package.jsonindex af8508543..644c55dcc 100644--- a/workflow-recipes/package.json+++ b/workflow-recipes/package.json@@ -1,6 +1,6 @@{"name": "workload-recipes-controller",- "version": "0.1.264",+ "version": "0.1.265","description": "Workload Recipes Controller (WRC) - WorkloadRecipe lifecycle management and MCP server interface","main": "dist/main.js","engines": {diff --git a/workflow-recipes/src/mcp/server.ts b/workflow-recipes/src/mcp/server.tsindex d9bcd438d..ff481f441 100644--- a/workflow-recipes/src/mcp/server.ts+++ b/workflow-recipes/src/mcp/server.ts@@ -344,17 +344,16 @@ export class ClerumMcpServer {routeRecipeName: string,subPath: string): Promise<void> {- const url = req.url ?? ''const authHeader = req.headers.authorizationconst token = authHeader?.startsWith('Bearer ') ? authHeader.slice(7) : ''let claimstry {claims = await verifyIncomingToken(token)- } catch (authErr) {- console.error(- `[WRC-AUTH] Token verification failed for ${req.method} ${url}:`,- authErr instanceof Error ? authErr.message : authErr- )+ } catch {+ // Do not reflect the request URL or parser error in logs: both can carry+ // attacker-controlled control characters or format tokens. The stable+ // event is sufficient for auth telemetry and avoids log/format injection.+ console.error('[WRC-AUTH] Token verification failed')res.writeHead(401, { 'Content-Type': 'application/json' })res.end(JSON.stringify({ error: 'Unauthorized' }))return