The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
fix: XSS in GitHubPanel markdown renderer and RouteCalculator profile bug
Claude483190e7c101
diff --git a/AUDIT_FINDINGS.md b/AUDIT_FINDINGS.mdindex 252ec4881..65fff0f63 100644--- a/AUDIT_FINDINGS.md+++ b/AUDIT_FINDINGS.md@@ -249,6 +249,19 @@|---|----------|------|---------|-------------|-----------------|--------|| AD-1 | **MEDIUM** | `server/src/routes/admin.ts` | 302-310 | Self-update endpoint runs `git pull` then `npm run build`. While admin-only and `npm install` uses `--ignore-scripts`, `npm run build` executes whatever is in the pulled package.json. A compromised upstream could execute arbitrary code. | Document as accepted risk for self-hosted self-update feature. Users should pin to specific versions. | DOCUMENTED |+### 1.9 Client-Side XSS++| # | Severity | File | Line(s) | Description | Recommended Fix | Status |+|---|----------|------|---------|-------------|-----------------|--------|+| X-1 | **CRITICAL** | `client/src/components/Admin/GitHubPanel.tsx` | 66, 106 | `dangerouslySetInnerHTML` with `inlineFormat()` renders GitHub release notes as HTML without escaping. Malicious HTML in release notes could execute scripts. | Escape HTML entities before applying markdown-style formatting. Validate link URLs. | FIXED |+| X-2 | **LOW** | `client/src/components/Map/MapView.tsx` | divIcon | Uses `escAttr()` for HTML sanitization in divIcon strings. Properly mitigated. | OK | OK |++### 1.10 Route Calculator Bug++| # | Severity | File | Line(s) | Description | Recommended Fix | Status |+|---|----------|------|---------|-------------|-----------------|--------|+| RC-1 | **HIGH** | `client/src/components/Map/RouteCalculator.ts` | 16 | OSRM URL hardcodes `'driving'` profile, ignoring the `profile` parameter. Walking/cycling routes always return driving results. | Use the `profile` parameter in URL construction. | FIXED |+### Additional Findings (from exhaustive scan)- **MEDIUM** — `server/src/index.ts:121-136`: Upload files (`/uploads/:type/:filename`) served without authentication. UUIDs are unguessable but this is security-through-obscurity. **REQUIRES MANUAL REVIEW** — adding auth would break shared trip image URLs.diff --git a/client/src/components/Admin/GitHubPanel.tsx b/client/src/components/Admin/GitHubPanel.tsxindex 8db9d6fc9..2dc6dfa69 100644--- a/client/src/components/Admin/GitHubPanel.tsx+++ b/client/src/components/Admin/GitHubPanel.tsx@@ -72,11 +72,15 @@ export default function GitHubPanel() {}}+ const escapeHtml = (str) => str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"')const inlineFormat = (text) => {- return text+ return escapeHtml(text).replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>').replace(/`(.+?)`/g, '<code style="font-size:11px;padding:1px 4px;border-radius:4px;background:var(--bg-secondary)">$1</code>')- .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#3b82f6;text-decoration:underline">$1</a>')+ .replace(/\[([^\]]+)\]\(([^)]+)\)/g, (_, label, url) => {+ const safeUrl = url.startsWith('http://') || url.startsWith('https://') ? url : '#'+ return `<a href="${escapeHtml(safeUrl)}" target="_blank" rel="noopener noreferrer" style="color:#3b82f6;text-decoration:underline">${label}</a>`+ })}for (const line of lines) {diff --git a/client/src/components/Map/RouteCalculator.ts b/client/src/components/Map/RouteCalculator.tsindex 6f79a97db..8300aabdc 100644--- a/client/src/components/Map/RouteCalculator.ts+++ b/client/src/components/Map/RouteCalculator.ts@@ -13,7 +13,7 @@ export async function calculateRoute(}const coords = waypoints.map((p) => `${p.lng},${p.lat}`).join(';')- const url = `${OSRM_BASE}/driving/${coords}?overview=full&geometries=geojson&steps=false`+ const url = `${OSRM_BASE}/${profile}/${coords}?overview=full&geometries=geojson&steps=false`const response = await fetch(url, { signal })if (!response.ok) {