T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:59- Finding
Full-record schema sampling violates least privilege and may expose sensitive graph data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Neo4j query helper, but it automatically probes and samples live database records and relies on weak execution safeguards for sensitive database access.
Review before installing, especially for production or sensitive graph databases. Use a dedicated read-only Neo4j account with restricted labels, properties, and procedures; require query preview/approval before schema discovery; avoid full-record sampling; require HTTPS to a trusted endpoint; and do not let raw query responses or credentials enter logs or persistent memory.
SKILL.md:59Full-record schema sampling violates least privilege and may expose sensitive graph data
SKILL.md:184Graph database credentials are exposed through command arguments and unrestricted transport configuration
SKILL.md:161Keyword-based Cypher guardrail can permit write-capable or privileged procedure execution
The skill explicitly says it will automatically probe database schema on first use, which can access and transmit metadata without an explicit user-facing consent or warning. Schema metadata, labels, property keys, and topology can be sensitive in enterprise environments because they reveal data models, business entities, and attack surface even when no row data is returned.
The examples instruct the agent to sample live nodes and relationships to infer properties, which can expose real record contents during automatic operation. Sampling 'RETURN n LIMIT 1' and relationship inspection may retrieve sensitive fields from production data, making this more dangerous than pure schema introspection because it touches actual data values.
The skill provides a concrete curl template that sends generated Cypher queries and potentially returned data to a remote database endpoint using credentials from environment variables. External transmission is inherent to database access, but it becomes a security issue here because the skill encourages automatic execution and data retrieval without strong consent boundaries, endpoint validation guidance, or minimization of returned content.
HTTP API 调用模板:
# Neo4j HTTP API
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "${GRAPHDB_USER}:${GRAPHDB_PASSWORD}" \
The worked example normalizes repeated remote curl-based schema and data sampling requests, showing how the skill would automatically transmit metadata requests and retrieve live node samples from the database. In context, this increases operational risk because it makes non-interactive probing of a potentially sensitive graph database part of the default workflow.
# 获取标签
curl ... -d '{"statements":[{"statement":"CALL db.labels() YIELD label RETURN collect(label) AS labels"}]}'
# 返回: ["Person", "Company", "Product", "Department"]
# 获取关系类型