T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:9- Finding
Overly Broad Access to Shared Credential Files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:9-13
Vulnerability Type: Excessive credential access scope
Risk Level: Mediumyaml config: - path: ~/.openclaw/.env description: Environment file for API keys - path: ~/.openclaw/credentials/.env description: Alternative credentials locationTechnical Analysis
The Skill requires only the
AMAP_WEBSERVICE_KEYenvironment variable, but its configuration declares two entire shared environment files as credential sources. These files may contain unrelated API keys, access tokens, or other secrets used by different Skills and services.If the OpenClaw host treats the
configentries as authorization or instructions to load these files, secrets unrelated to the Skill's map functionality could become available in the Skill or Agent execution environment. This exceeds the least-privilege access required for geocoding, routing, and POI search.The reviewed file does not instruct the Agent to disclose, transmit, or misuse these credentials. Therefore, this is an excessive-access and blast-radius issue rather than evidence of intentional credential theft.
Attack Path
- A user stores
AMAP_WEBSERVICE_KEYand unrelated credentials in one of the declared shared.envfiles. - The host loads the Skill and processes its file-level configuration declarations.
- The host reads the entire shared environment file rather than retrieving only
AMAP_WEBSERVICE_KEY. - Unrelated secrets become accessible to the Skill, Agent context, or associated tools.
- A later malicious prompt, compromised tool, or vulnerable integration could read or disclose those unrelated secrets.
This exploitation path depends on the host interpreting the metadata as permission to read or import the complete files.
Impact Assessment
The Skill could gain read access to credentials beyond those necessary for its declared map-service functionality. The pre ...[truncated 390 chars]
- A user stores
- Remediation
View remediation
Remediation Suggestions
- Remove both file-level
configdeclarations and request only the namedAMAP_WEBSERVICE_KEYenvironment variable through the existing credential metadata. - If file-based configuration is mandatory, use a dedicated provider-specific file containing only the Amap key rather than shared OpenClaw environment files.
- Configure the host to allowlist individual variable names and avoid injecting every value from a shared
.envfile into the Skill context. - Apply restrictive filesystem permissions to any dedicated credential file, allowing access only to the owning user.
- Ensure credentials are passed directly to the map API client and are never included in generated URLs, logs, responses, or Agent-visible diagnostic output.
- Document key rotation and revocation procedures in case a shared environment file was previously exposed.
- Remove both file-level
