Summary
bird-lg-go may allow an unauthenticated remote attacker to read local files because it does not adequately sanitize an input path. If the affected looking-glass service is reachable, sensitive files may be exposed.
Affected context
The issue occurs in bird-lg-go when a request can supply a path that the application uses to access a local file. Deployments may be at risk when the service is reachable by unauthenticated users and the supplied path is not sufficiently constrained.
Exploit preconditions
- Attack surface: A remotely reachable bird-lg-go looking-glass service
- Required access: No authentication is required, according to the vulnerability description
- Trigger point: A request that causes the application to use an attacker-supplied path for local file access
- Why exploitation is possible: The path is not adequately sanitized or restricted, potentially allowing access beyond intended files
Why this happens
The underlying issue is insufficient validation and restriction of a path derived from untrusted input. This can expose files outside the application's intended data set, resulting in information disclosure associated with CWE-200. CWE-88 is also listed for this issue; regardless of the specific input-handling classification, the insecure pattern is allowing untrusted path data to influence local file access without adequate controls.
Potential impact
- An attacker may read sensitive local files, including system or user data
- Exposed files could reveal credentials, configuration details, or operational history
- Disclosure of sensitive information could support further compromise
General mitigation guidance
Defensive patterns include:
- Prefer fixed, application-controlled file locations over paths supplied by users
- If user-selected files are necessary, restrict access to an explicit allowlist and verify canonicalized paths remain within an intended directory
- Reject unexpected path forms and avoid relying on superficial string checks
- Run the service with the least privileges needed and limit its access to sensitive filesystem locations
- Keep sensitive files outside directories accessible to the service where practical
How teams detect issues like this
- Review code paths where request data reaches file-opening or filesystem APIs
- Use static analysis to flag untrusted input used in path construction or file access
- Check that path validation occurs before filesystem operations and enforces an intended directory boundary
- Apply policy checks in code review and CI to identify unrestricted user-controlled file access
- Monitor service and host logs for unusual file-access errors or unexpected access patterns

