Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› FormatMsgNoLookups
Cyber Security

FormatMsgNoLookups

← Back to Glossary
By NHI Mgmt Group Updated November 3, 2026 Domain: Cyber Security

FormatMsgNoLookups is a security setting in some logging systems that disables variable lookup expansion during message formatting. It prevents attacker-controlled text in a log message from being interpreted as a reference to environment data, system properties or other values, reducing the risk of log injection and unexpected data exposure.

What FormatMsgNoLookups Does

FormatMsgNoLookups is a defensive setting that changes how a logging system handles message formatting. Its purpose is narrow but important: prevent untrusted text in a log entry from being expanded into looked-up values, so attacker-supplied content is treated as plain text rather than a trigger for data retrieval or substitution.

That matters because log formatting is often assumed to be passive. When formatting logic can resolve variables, placeholders, or lookup tokens, a log line becomes a potential execution path for unexpected data access or transformation. Disabling lookups reduces the chance that a malicious message can influence what the logger reveals or processes.

Why Message Lookups Are Dangerous

Lookup expansion is risky when the logging path accepts text from users, upstream services, or other untrusted sources. A crafted message may cause the logger to resolve environment values, system properties, or other runtime data, which can expose sensitive information that was never meant to leave the host or application boundary.

The problem is not limited to confidentiality. Once message content can influence lookup behaviour, the logging pipeline becomes harder to reason about, because the recorded text is no longer a faithful rendering of the original input. That creates an integrity issue in the log stream itself and can complicate incident analysis, alerting, and downstream parsing.

How To Recognise Exposure

Exposure is most likely where applications log user-controlled strings, template-driven messages, headers, or fields that may contain special formatting syntax. The key question is whether the logging library evaluates the message before storing or emitting it. If it does, then the application should be reviewed for any path where attacker-controlled input can reach that formatter.

For validation, organisations should check application configuration, library defaults, and dependency versions rather than assuming the setting is globally enforced. Centralised logging controls help, but the actual risk often sits inside the application or library configuration that decides whether lookup expansion is active at all.

Security Implications and Safe Handling

The security consequence of leaving lookups enabled is that a log message can become an unintended data retrieval mechanism. In practice, that can lead to information disclosure, confusing log output, or a malformed event stream that obscures what was really received. In some environments, the same weakness may also amplify other bugs by making hostile input behave differently during logging than it does during normal application processing.

Safer handling means treating logs as untrusted data sinks and ensuring message rendering is deterministic. Security teams should also verify that logging frameworks are configured to record input verbatim wherever possible, and that sensitive runtime context is not exposed through formatter behaviour. For broader control alignment, see NIST SP 800-53 Rev 5 Security and Privacy Controls for logging, integrity, and configuration-related safeguards, and OWASP API Security Top 10 for related input-handling and exposure risks at the interface layer.

Risk and Threat Considerations

When message lookup expansion is enabled, attacker-controlled text can be turned into an information-disclosure path inside the logging stack. The practical risk is greatest when logs are written from externally influenced input and the formatter can resolve runtime values as part of rendering.

Failure mechanism: A crafted message reaches the logger, the formatter interprets lookup syntax, and the logging system resolves or substitutes data that should have remained inaccessible or inert.

Impact: Sensitive values may be exposed in logs, log integrity may be degraded, and defenders may lose confidence that a logged message reflects the original input exactly.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, OWASP ASVS and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5AU-3 — Content of Audit RecordsLog rendering must preserve faithful event content without unintended expansion.
CM-6 — Configuration SettingsThe setting is a configuration choice that changes security behaviour in the logger.
SI-10 — Information Input ValidationAttacker-controlled log input should not be interpreted as active lookup syntax.
Recommendation — Record application events in a form that preserves original input and avoids unsafe message expansion. Disable unsafe lookup expansion through approved secure configuration baselines and verify it after changes. Validate and treat log-bound user input as inert data before it reaches formatting logic.
OWASP ASVSV16 — Security Logging and Error HandlingThe term directly concerns safe logging behaviour and trustworthy log output.
Recommendation — Ensure logging captures untrusted input safely and does not transform it during record creation.
CIS Controls v8CIS-8 — Audit Log ManagementThe setting protects the integrity and trustworthiness of audit and application logs.
Recommendation — Harden logging configurations so audit records remain accurate, complete, and resistant to manipulation.

Practitioner Guidance

What to watch for: Treat any logging path that accepts untrusted text as a configuration review candidate, especially when the application uses a formatter with variable or property expansion. The safest assumption is that lookup-enabled formatting is a risk unless it is explicitly disabled and verified in the deployed configuration.

Governance implication: Ownership should sit with the team that controls the application and its logging dependencies, not only with central platform operations. The setting is easy to miss during upgrades or framework changes, so it should be part of secure configuration review and dependency testing rather than a one-time hardening step.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org