~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix: Address CodeQL security vulnerabilities
LearningCircuit1506523e73ab
diff --git a/src/local_deep_research/web/auth/routes.py b/src/local_deep_research/web/auth/routes.pyindex 71b56a4d17..e03a87fb9d 100644--- a/src/local_deep_research/web/auth/routes.py+++ b/src/local_deep_research/web/auth/routes.py@@ -159,7 +159,7 @@ def login():# Check if it's in the whitelist or is a safe relative pathif parsed_url.path in allowed_paths:- safe_redirect = next_page+ safe_redirect = parsed_url.path # Use parsed path, not raw inputelif (parsed_url.pathand parsed_url.path.startswith("/")@@ -167,7 +167,9 @@ def login():):# Additional checks for safetyif ".." not in parsed_url.path and normalized_path.startswith("/"):- safe_redirect = next_page+ safe_redirect = (+ parsed_url.path+ ) # Use parsed path, not raw inputelse:logger.warning(f"Blocked potentially unsafe redirect with path traversal: {next_page}"diff --git a/src/local_deep_research/web/static/js/services/pdf.js b/src/local_deep_research/web/static/js/services/pdf.jsindex fa5228922e..7d981139f3 100644--- a/src/local_deep_research/web/static/js/services/pdf.js+++ b/src/local_deep_research/web/static/js/services/pdf.js@@ -860,14 +860,18 @@ async function downloadPdf(titleOrData, content, metadata = {}) {.replace(/<h3[^>]*>(.*?)<\/h3>/gi, '### $1\n\n').replace(/<p[^>]*>(.*?)<\/p>/gi, '$1\n\n').replace(/<li[^>]*>(.*?)<\/li>/gi, '- $1\n')- .replace(/<br\s*\/?>/gi, '\n')- .replace(/<(?:.|\n)*?>/gm, '') // Remove remaining HTML tags+ .replace(/<br\s*\/?>/gi, '\n');++ // Use DOM-based HTML stripping for security (prevents XSS)+ const tempDiv = document.createElement('div');+ tempDiv.innerHTML = pdfContent;+ pdfContent = (tempDiv.textContent || tempDiv.innerText || '').replace(/ /gi, ' ').replace(/</gi, '<').replace(/>/gi, '>')- .replace(/&/gi, '&').replace(/"/gi, '"').replace(/'/gi, "'")+ .replace(/&/gi, '&') // MUST be last to prevent double-unescaping.replace(/\n{3,}/g, '\n\n'); // Normalize excessive newlines} else {// Last resort: stringify the entire object