T09 · Insecure Skill Coding Practices
- Location
scripts/setup.py:35- Finding
Unauthenticated memory databases exposed on host network interfaces
- Content
View full analysis
Vulnerability Details
File Location:
scripts/setup.py, lines 35-59
Vulnerability Type: Unauthenticated network service exposure
Risk Level: HighVulnerable Code
python DOCKER_COMPOSE_CONTENT = """version: '3.8' services: qdrant: image: qdrant/qdrant:latest container_name: deep-memory-qdrant ports: - "6333:6333" - "6334:6334" volumes: - qdrant_data:/qdrant/storage restart: unless-stopped neo4j: image: neo4j:5-community container_name: deep-memory-neo4j ports: - "7474:7474" - "7687:7687" environment: - NEO4J_AUTH=none - NEO4J_PLUGINS=["apoc"] volumes: - neo4j_data:/data restart: unless-stopped volumes: qdrant_data: neo4j_data: """Technical Analysis
The generated Docker Compose configuration publishes Qdrant ports
6333and6334and Neo4j ports7474and7687without specifying a loopback host address. Under normal Docker port-publishing behavior, these services are bound to all available host interfaces unless network or daemon configuration imposes an additional restriction.Neo4j authentication is explicitly disabled through
NEO4J_AUTH=none. Qdrant is also deployed without an API key, TLS, or another access-control mechanism. The databases contain persistent agent memories and expose APIs that support reading, inserting, updating, and deleting records.Consequently, any party capable of reaching these ports can interact with the memory stores without presenting credentials. This creates both a confidentiality risk and a memory-poisoning path, because later searches can return content inserted or modified by an unauthorized party.
Attack Path
- A victim runs
scripts/setup.py, which writes and launches the generated Docker Compose configuration. - Docker publishes Qdrant and Neo4j on the host interfaces.
- An attacker on a rea ...[truncated 1362 chars]
- A victim runs
- Remediation
View remediation
Remediation Suggestions
-
Bind every published service port exclusively to the loopback interface when remote access is unnecessary:
yaml ports: - "127.0.0.1:6333:6333" - "127.0.0.1:6334:6334"Apply the same restriction to Neo4j ports
7474and7687. -
Enable Neo4j authentication by replacing
NEO4J_AUTH=nonewith a securely generated credential. Do not commit or hardcode that credential in the skill; load it from a protected environment file or secret store. -
Configure Qdrant API-key authentication and require clients to send the key. Store the key with restrictive file permissions and outside version control.
-
Use TLS for any database access that crosses a trusted local boundary.
-
Restrict inbound access with host firewall rules and, where applicable, cloud security groups.
-
Place the services on a private Docker network and avoid publishing database ports when only other containers require access.
-
After service startup, verify that authentication is active and fail setup rather than reporting success when an insecure configuration remains accessible.
-
