Back to skill

Security audit

EWS Skill

Security checks for vulnerabilities and agentic risk

Overview

This calendar skill does what it says, but it handles Exchange credentials and sensitive meeting data in ways that need review before installation.

Install only if you trust the configured Exchange URL and can protect the local machine. Prefer the keyring setup with interactive password entry, avoid .env and --password usage, use HTTPS Exchange endpoints only, and do not write debug XML or output files into shared directories.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
ews-calendar.sh:116
Finding

Exchange credentials can be transmitted to an unvalidated or plaintext endpoint

Content
View full analysis
&1) ``` ### Technical Analysis The script retrieves the Exchange password from the operating-system keyring and supplies it to `curl` for NTLM authentication. Authentication to an Exchange server is required for the declared calendar functionality, but the destination is controlled entirely through `EWS_URL`. The script does not validate that the URL: - Uses HTTPS. - Refers to an approved Exchange host. - Uses an expected port. - Is not an attacker-controlled endpoint. Consequently, a configuration error or unauthorized modification of the environment or OpenClaw configuration can cause the Skill to initiate NTLM authentication against an unintended server. NTLM does not ordinarily place the literal password directly in the HTTP request, but authentication exchanges over an untrusted connection can still enable credential capture, offline attacks, or relay attacks. A plaintext HTTP endpoint also lacks confidentiality and integrity protection for SOAP requests and responses. The network communication itself is necessary for the Skill, and no separate exfiltration endpoint was identified. The security issue is that the sensitive authentication flow is not restricted to a trusted, encrypted destination. ### Attack Path 1. An attacker who can modify the Skill environment or OpenClaw configuration changes `EWS_URL` to an attacker-controlled HTTP or HTTPS endpoint. 2. The user invokes `ews-calendar-secure.sh`. 3. The wrapper retrieves the user's Exchange password from the OS keyring and exports it as `EWS_PASS`. 4. `ews-calendar.sh` ...[truncated 897 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
ews-calendar.sh:100
Finding

Sensitive calendar responses are written without owner-only permission enforcement

Content
View full analysis
"$DEBUG_XML" log "Saved raw XML to $DEBUG_XML" fi } ``` ```bash if [[ -n "$OUTPUT_FILE" ]]; then echo "$json_output" > "$OUTPUT_FILE" log "Output written to $OUTPUT_FILE" else echo "$json_output" fi ``` ### Technical Analysis The `--debug-xml` option writes the raw EWS response to a caller-selected path, while `--output` writes the generated calendar JSON to a caller-selected path. The script does not set a restrictive `umask`, securely create the destination, or explicitly set owner-only permissions. The resulting permissions therefore depend on the invoking process's umask and the state of an existing destination file. On a multi-user system with a permissive umask, newly created output can be readable by other local users. Existing files may retain broader permissions. The saved data can contain: - Meeting subjects and schedules. - Organizer email addresses. - Meeting locations. - Full event body text. - Conference and document links. - Raw EWS item identifiers and response metadata. The debug XML is especially sensitive because it preserves the unprocessed server response. ### Attack Path 1. The Skill runs on a shared system under a permissive umask, or the user selects a shared directory such as `/tmp`. 2. The user invokes the Skill with `--output FILE` or `--debug-xml FILE`. 3. The shell creates or truncates the selected file without enforcing owner-only permissions. 4. Calendar content is written to the file. 5. Another local user or process reads the file through its group/world-readable permissions. A related local file risk exists when writing to attacker-influenced locations because ordinary shell redirection follows symbol ...[truncated 777 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
ews-calendar-setup.sh:97
Finding

Password command-line option exposes Exchange credentials through process and shell metadata

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (65)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 17)May include surrounding context.

md
- **curl** - HTTP requests
- **xmllint** - XML parsing (part of libxml2)
- **macOS**: Keychain Access (built-in)
- **Linux**: libsecret-tools + gnome-keyring

### Linux Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 118)May include surrounding context.

md
- **curl** - HTTP requests
- **xmllint** - XML parsing (part of libxml2)
- **macOS**: Keychain Access (built-in)
- **Linux**: libsecret-tools + gnome-keyring

### Linux Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 34)May include surrounding context.

md
- **curl** - HTTP requests
- **xmllint** - XML parsing (part of libxml2)
- **macOS**: Keychain Access (built-in)
- **Linux**: libsecret-tools + gnome-keyring

### Linux Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · ews-calendar-secure.sh (reported line 18)May include surrounding context.

sh
- **curl** - HTTP requests
- **xmllint** - XML parsing (part of libxml2)
- **macOS**: Keychain Access (built-in)
- **Linux**: libsecret-tools + gnome-keyring

### Linux Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · ews-calendar-secure.sh (reported line 42)May include surrounding context.

sh
- **curl** - HTTP requests
- **xmllint** - XML parsing (part of libxml2)
- **macOS**: Keychain Access (built-in)
- **Linux**: libsecret-tools + gnome-keyring

### Linux Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · ews-calendar-setup.sh (reported line 59)May include surrounding context.

sh
- **curl** - HTTP requests
- **xmllint** - XML parsing (part of libxml2)
- **macOS**: Keychain Access (built-in)
- **Linux**: libsecret-tools + gnome-keyring

### Linux Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · ews-calendar-setup.sh (reported line 81)May include surrounding context.

sh
- **curl** - HTTP requests
- **xmllint** - XML parsing (part of libxml2)
- **macOS**: Keychain Access (built-in)
- **Linux**: libsecret-tools + gnome-keyring

### Linux Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 24)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 27)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 30)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 177)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 45)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 48)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 51)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 169)May include surrounding context.

bash
# Debian/Ubuntu
sudo apt install libsecret-tools gnome-keyring

# Fedora
sudo dnf install libsecret gnome-keyring

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The .env-sourcing example directly supports local plaintext secret storage and shell ingestion of credentials. In practice, such files are often world-readable, accidentally committed, included in archives, or accessed by other local processes/users, making credential theft more likely in enterprise environments where EWS accounts may expose sensitive calendar data.

Content

Scanner excerpt · README.md (reported line 226)May include surrounding context.

Or create a .env file and source it:

bash
source .env
./ews-calendar.sh --date today

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to extract calendar events, but it also documents retrieving full event bodies, extracting links, writing results to arbitrary files, saving raw XML, and loading credentials from a local .env file. This broadens the data-access and exfiltration surface beyond simple metadata retrieval and increases risk of exposing sensitive meeting content and credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims to extract calendar events, but it also documents retrieving full event bodies, extracting links, writing results to arbitrary files, saving raw XML, and loading credentials from a local .env file. This broadens the data-access and exfiltration surface beyond simple metadata retrieval and increases risk of exposing sensitive meeting content and credentials.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
84% confidence
Finding

The file list explicitly states that the main script reads from env or .env, which means the skill package supports a weaker credential path alongside the keyring wrapper. In this context, the issue is not credential access itself but the presence of an insecure secret-loading mechanism that can lead to plaintext storage or accidental exposure.

Content

Scanner excerpt · SKILL.md (reported line 242)May include surrounding context.

md
{baseDir}/
├── SKILL.md                 # This file
├── ews-calendar.sh          # Main script (reads from env or .env)
├── ews-calendar-secure.sh   # Wrapper that gets password from keyring
├── ews-calendar-setup.sh    # Store credentials in keyring
├── templates/
│   ├── find-items.xml       # SOAP template for finding calendar items

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The standalone section confirms that users may place credentials in a .env file and only then warns about plaintext storage. In context, this materially increases credential exposure risk because passwords may persist on disk, enter backups, or be accidentally shared.

Content

Scanner excerpt · SKILL.md (reported line 258)May include surrounding context.

md
2. Fill in your credentials
3. Run: `./ews-calendar.sh --date today`

**Warning:** This stores password in plaintext. Use keyring for production.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 160)May include surrounding context.

md
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SERVICE_NAME="ews-calendar"

# Detect OS and get password from keyring
get_password() {
    local user="${EWS_USER:-}"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 182)May include surrounding context.

md
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SERVICE_NAME="ews-calendar"

# Detect OS and get password from keyring
get_password() {
    local user="${EWS_USER:-}"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 204)May include surrounding context.

md
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SERVICE_NAME="ews-calendar"

# Detect OS and get password from keyring
get_password() {
    local user="${EWS_USER:-}"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 205)May include surrounding context.

md
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SERVICE_NAME="ews-calendar"

# Detect OS and get password from keyring
get_password() {
    local user="${EWS_USER:-}"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 230)May include surrounding context.

md
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SERVICE_NAME="ews-calendar"

# Detect OS and get password from keyring
get_password() {
    local user="${EWS_USER:-}"

Static analysis

No suspicious patterns detected.