Summary
Steeltoe's Environment actuator may expose full connection strings, including embedded credentials, because its sanitizer only matches key-name suffixes and does not scrub values.
When the /actuator/env endpoint is exposed without additional protections, attackers who can reach it may obtain database or service credentials from configuration output.
Affected context
The issue arises in applications using Steeltoe.Management.Endpoint or Steeltoe.Management.EndpointCore with the Environment actuator (/actuator/env) enabled.
It is most relevant when:
- The actuator endpoints are exposed over HTTP(S) in production or semi-trusted environments
- Default or minimal
Sanitizerconfiguration is used - Connection strings are stored using .NET's conventional
ConnectionStrings:<name>pattern or Steeltoe Connectors'Steeltoe:Client:<type>:Default:ConnectionStringkeys
Under these conditions, configuration responses may include raw connection strings containing passwords or embedded user:password segments.
Exploit preconditions
- Attack surface: HTTP(S) access to the Environment actuator endpoint (commonly
/actuator/envor equivalent). - Required access: Ability to reach the actuator endpoint; may be unauthenticated if the deployment does not enforce authorization.
- Trigger point: An HTTP request to the Environment actuator that causes it to serialize and return configuration values.
- Why exploitation is possible: The
Sanitizercomponent uses a key-suffix-based list that omits common connection string key patterns and performs no value-based scrubbing, so credentials embedded in connection string values are returned verbatim.
Why this happens
The root cause is a mismatch between the sanitizer's key-based rules and real-world configuration naming patterns, combined with a lack of value-aware redaction.
The Sanitizer only redacts values when the configuration key ends with certain suffixes (e.g., password, secret, key, token, .*credentials.*, vcap_services), but it does not treat common connection string keys (ConnectionStrings:<name>, Steeltoe:Client:<type>:Default:ConnectionString) as sensitive by default.
Because there is no inspection of the value structure for credential-like patterns (such as Password= or user:pass@host), secrets are handled like ordinary configuration and included in the response.
This maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, with additional relevance to CWE-319: Cleartext Transmission of Sensitive Information when such responses traverse the network.
Potential impact
- Exposure of database credentials via environment/actuator responses
- Leakage of service or message broker connection strings used by Steeltoe connectors
- Unauthorized access to backend systems or third-party services using the disclosed credentials
- Facilitation of lateral movement within the environment once attackers use stolen credentials
- Increased blast radius if the same secrets are reused across multiple environments or services
General mitigation guidance
Mitigation focuses on tightening both exposure of diagnostic endpoints and handling of sensitive configuration values:
- Limit exposure of the Environment actuator in production; consider disabling it entirely where not strictly needed.
- Require strong authentication and authorization for all actuator endpoints, especially those returning configuration or environment details.
- Configure the sanitizer to treat connection string keys as sensitive (e.g., adding patterns that match
ConnectionStringor similar identifiers). - Prefer configuration layouts that clearly mark secret fields (e.g., separate
Password/Userkeys) so they are more easily covered by redaction rules. - Apply least-privilege to credentials in configuration so that any accidental disclosure has reduced impact.
How teams detect issues like this
Effective detection combines configuration review, code analysis, and runtime observation:
- Review actuator configuration for exposure of the Environment endpoint, especially in non-development environments.
- Use static or configuration analysis to flag actuator endpoints that are accessible without authentication or that return detailed configuration data.
- During code review, check for reliance on default sanitizer settings and look for configuration keys containing
ConnectionString(or similar) that are not explicitly marked for redaction. - Conduct security testing to request
/actuator/envor equivalent endpoints and verify that secrets are not present in responses. - Integrate automated policy checks into CI/CD pipelines to enforce secure actuator configurations (e.g., requiring authentication and sanitized key patterns).

