Habr•July 30, 2026•🇷🇺Translated from Russian

Secure Error Logging Practices to Prevent Information Leaks Across Java, Kotlin, JavaScript and Python

Error logging forms a critical part of the software development lifecycle, aiding debugging and early detection of failures. However, logs must remain both informative and secure to avoid unintended information disclosure.

The article, written by Natalia Noyanova of T1 IT Holding, draws on years of experience in information security and static code analysis. It highlights how code analyzers flag internal or external information leaks tied to error logging and explains why fixing these issues requires more than simple code changes.

Logging levels range from DEBUG (detailed diagnostic data not used in production) through INFO, WARNING, ERROR to FATAL (critical errors that halt the application). Recording mechanisms include plain text files, multi-stage logs requiring special readers, binary formats and databases.

Trace ID provides a unique technical identifier generated at the API gateway for each incoming request and propagated unchanged through all microservices. Correlation ID links multiple technical requests that belong to one business transaction, such as an order placement involving inventory, payment and confirmation steps.

Examples of exploitation include Flask applications running with debug=True that return full stack traces revealing absolute paths like /app/main.py and Python interpreter versions. Similar leaks occur when developers manually return traceback.format_exc() or forward raw SQLite errors after failed queries, confirming the database engine and aiding SQL injection refinement.

Prevention measures cover removal of X-Powered-By and Server headers via Nginx server_tokens off, input sanitization with regular expressions to block newlines in trace identifiers, and adoption of OpenTelemetry for automatic generation of safe hex-formatted trace IDs. Structured JSON logging further isolates fields and prevents log injection attacks described under CWE-117.

Related articles

Security NEXT•Vulnerabilities & Exploits

Multiple Vulnerabilities Found in nginx Web Server, Three Rated Critical by F5

F5 disclosed an out-of-band security advisory on October 14, 2026, revealing a total of 11 vulnerabilities across nginx and related products. Five issues affect the core open-source nginx server while six more impact associated offerings including NGINX Gateway Fabric and NGINX Ingress Controller. The flaws can lead to denial of service, remote code execution, authentication bypass, and sensitive information disclosure. Although the official nginx project rates all five core vulnerabilities as Medium severity, F5 assigns a CVSS v4.0 base score of 9.2 to three of them, classifying them as Critical. One example is CVE-2026-15176, a heap buffer overflow in the ngx_http_core_module that triggers under specific URL rewrite and file-path configuration settings.

Security NEXT•Vulnerabilities & Exploits

CISA Adds BeyondTrust Remote Support and Fortinet Flaws to KEV Catalog Following Zero-Day Exploitation by ARMORY CASTLE

The US Cybersecurity and Infrastructure Security Agency has added two vulnerabilities affecting Fortinet and BeyondTrust products to its Known Exploited Vulnerabilities catalog. CVE-2026-102764 is an authentication bypass flaw in BeyondTrust Remote Support that allows remote attackers to manipulate appliance files without credentials due to insufficient source validation. BeyondTrust released an advisory on October 15, 2026, rating the issue 9.3 on CVSS v4.0 as Critical. Mandiant attributes the zero-day exploitation to the suspected Chinese group ARMORY CASTLE, which deployed web shells for persistence and privilege escalation in late August. The second CVE, CVE-2025-61624, also appears on the KEV list but lacks further public technical details in the current advisory. Organizations are urged to apply patches immediately to prevent further compromise.

Habr•Vulnerabilities & Exploits

Use-After-Free in HTTP/2 Upload Leads to Potential RCE in curl: Detailed Analysis of CVE-2026-92392

In curl 8.23.0, developers fixed a high-severity Use-After-Free vulnerability tracked as CVE-2026-92392 that could allow remote code execution during HTTP/2 uploads. The flaw stems from a dangling pointer left on an easy handle after a server resets an HTTP/2 stream, which later gets dereferenced when the multi handle closes. An attacker controlling the server can influence memory contents to hijack a function pointer and execute arbitrary code, though successful exploitation requires precise conditions including upload size, memory layout, and knowledge of the target architecture. The issue was discovered by Luna Tong at Anthropic using their OSS Scanner and reported to the curl security team on September 15. The team accelerated the release cycle by two weeks to deliver the fix while maintaining standard procedures. curl maintainers continue reducing internal handle pointers in favor of identifiers and are adding more tests and static analysis to prevent similar memory-safety errors. The vulnerability highlights ongoing risks in C-based networking code handling multiplexed protocols like HTTP/2.

Habr•Vulnerabilities & Exploits

Automating Asset Scanning in MaxPatrol VM via API: Part 4 on Authentication

A detailed technical guide explains how to build asset scanning automation in MaxPatrol VM using its API, starting with authentication methods. The author covers three authorization options including local account login-password, domain account credentials, and reference tokens, providing working Python examples for local accounts. Code reads secrets from an .env file and obtains a Bearer token valid for 24 hours from the Core role instance. The post details required privileges in both the Management Console and MaxPatrol 10 for tasks such as vulnerability exports, dynamic asset group management, scan task creation, and report exporting. It credits Alexey Leonov for an early GitHub script that enabled practical API usage and lists additional resources including webinars, SDK, CLI, Jira integration, and a Postman collection. All subsequent API calls rely on the generated headers containing the Bearer token.