Back to skill

Security audit

ServiceNow

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real ServiceNow automation skill, but it needs review because it can broadly change ServiceNow data and handles reusable credentials in a way that could expose them.

Use only a dedicated least-privilege ServiceNow integration account, avoid admin credentials, require human review for create/update/delete/batch and attachment actions, set SN_INSTANCE to HTTPS, and consider patching HTTPS validation and credential handling before production use.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sn.sh:19
Finding

Basic Authentication Credentials Can Be Exposed Through Plaintext HTTP and Process Arguments

Content
View full analysis
&2; exit 1; } info() { echo "→ $*" >&2; } sn_curl() { local method="$1" url="$2" shift 2 curl -sf -X "$method" "$url" \ -u "$AUTH" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ "$@" } ``` ### Technical Analysis The instance URL validation does not enforce HTTPS. It only tests whether `SN_INSTANCE` starts with the characters `http`, so an explicitly configured `http://` URL passes the check unchanged. Basic Authentication credentials are therefore eligible to be transmitted over an unencrypted connection. The code also combines the username and reusable password into `AUTH` and supplies that value through the `curl` command-line option `-u "$AUTH"`. On systems where process command lines are visible to other users, monitoring tools, diagnostic utilities, or privileged processes, the resulting `username:password` argument may be observed while `curl` is running. The same command-line authentication pattern is also used directly by delete, attachment, and batch-delete requests elsewhere in the script. The issue is especially significant because the account can be authorized for CRUD operations across sensitive ServiceNow tables. No hardcoded credentials, hidden credential destination, or deliberate credential collection was identified. Exploitation requires influence over configuration or network traffic, or local process-inspection access. ### Attack Path #### Plaintext transport path 1. A user or automation system co ...[truncated 1934 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README markets broad CRUD, batch, and attachment capabilities but does not clearly warn users that the skill can modify or permanently delete arbitrary ServiceNow records and exfiltrate attachment contents from any table the configured account can access. In an agent setting, missing safety disclosure increases the chance that operators grant powerful credentials or invoke destructive actions without understanding the blast radius.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill exposes broad shell-backed capabilities that can query, create, update, delete, batch-modify, and transfer attachments in ServiceNow, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, missing scope metadata increases the chance that the agent can invoke powerful operations without clear policy enforcement or user awareness, especially for destructive actions like delete, batch update, and attachment file access.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/sn.sh (reported line 111)May include surrounding context.

sh
local url="${SN_INSTANCE}/api/now/table/${table}"
  info "POST $table"
  local resp
  resp=$(sn_curl POST "$url" -d "$json") || die "Create failed"
  echo "$resp" | jq '{sys_id: .result.sys_id, number: .result.number, result: .result}'
  info "Created record: $(echo "$resp" | jq -r '.result.sys_id')"
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/sn.sh (reported line 128)May include surrounding context.

sh
local url="${SN_INSTANCE}/api/now/table/${table}/${sys_id}"
  info "PATCH $table/$sys_id"
  local resp
  resp=$(sn_curl PATCH "$url" -d "$json") || die "Update failed"
  echo "$resp" | jq '.result'
  info "Updated record: $sys_id"
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

Attachment upload can transmit arbitrary local file contents from the host to ServiceNow, which materially increases data-exfiltration risk compared with ordinary record CRUD. In an agent context, if an untrusted prompt or workflow can influence file paths, sensitive files could be uploaded to a remote system under valid credentials.

Content

Scanner excerpt · scripts/sn.sh (reported line 274)May include surrounding context.

sh
filename=$(basename "$filepath")
      local url="${SN_INSTANCE}/api/now/attachment/file?table_name=${table}&table_sys_id=${sys_id}&file_name=${filename}"
      info "UPLOAD $filename to $table/$sys_id"
      curl -sf -X POST "$url" \
        -u "$AUTH" \
        -H "Accept: application/json" \
        -H "Content-Type: ${ctype}" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/sn.sh (reported line 357)May include surrounding context.

sh
if [[ "$action" == "update" ]]; then
      local patch_url="${SN_INSTANCE}/api/now/table/${table}/${sys_id}"
      if sn_curl PATCH "$patch_url" -d "$fields" >/dev/null 2>&1; then
        processed=$((processed + 1))
      else
        failed=$((failed + 1))

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The health command expands the skill beyond simple record CRUD/analytics into instance-administration and operational reconnaissance by querying internal tables such as sys_cluster_state, sys_trigger, sys_semaphore, and sys_properties. In an agent setting, this broadens accessible sensitive metadata and can aid environment discovery, privilege misuse, or unintended operational monitoring not clearly scoped by the skill description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The attachment commands allow downloading remote content to a local path and uploading a local file from disk, but the documentation does not prominently warn about local filesystem side effects. In an agent setting, this can lead to unintended overwrites, exfiltration of sensitive local files, or unsafe handling of untrusted downloaded content if the user does not realize these operations cross the local file boundary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description says the skill connects to ServiceNow using the Table API and Stats API, yet the attach subcommands call /api/now/attachment endpoints for listing, downloading, and uploading files. Although attachment management is mentioned later in the description, the implementation uses an additional API surface not reflected in the earlier API-scoping claim.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.