T09 · Insecure Skill Coding Practices
- Location
references/user-role.md:7- Finding
Predictable Hard-Coded Database Passwords in RBAC Examples
- Content
View full analysis
Vulnerability Details
File Location:
references/user-role.md, lines 7 and 16
Vulnerability Type: Hard-coded predictable credentials
Risk Level: MediumVulnerable Code
python # Create a user client.create_user(user_name="analyst", password="SecureP@ss123")python # Update password client.update_password( user_name="analyst", old_password="SecureP@ss123", new_password="NewP@ss456" )Technical Analysis
The RBAC examples provide literal passwords that resemble usable credentials rather than unmistakable placeholders. Because this skill is intended to generate or guide executable Milvus administration code, an agent or operator may copy these examples without replacing the values.
Both passwords are publicly visible, predictable, and shared by every unchanged deployment. Password complexity formatting does not provide security when the complete value is published. If authentication is enabled and the example is used as written, anyone familiar with the skill can attempt to authenticate as
analyst.Attack Path
- An operator asks an agent using this skill to create or update a Milvus user.
- The agent reproduces the documented RBAC example without replacing its password literals.
- The Milvus account is created with
SecureP@ss123, or its password is changed toNewP@ss456. - An attacker identifies a reachable Milvus endpoint and attempts authentication using the published username and passwords.
- If authentication succeeds, the attacker receives all permissions assigned to the
analystaccount through direct role assignments or later privilege changes.
Exploitation requires the example to have been used unchanged and the attacker to have network access to the affected Milvus service.
Impact Assessment
Successful exploitation permits authentication as the affected Milvus user. The precise scope depends on roles granted to
analyst. Possible access includes searching and querying stored ...[truncated 333 chars]- Remediation
View remediation
Remediation Suggestions
- Replace all literal passwords with unmistakable placeholders, such as
<USER_PROVIDED_PASSWORD>and<CURRENT_PASSWORD>. - Instruct operators to generate a unique, cryptographically random password for every account.
- Obtain sensitive values at runtime through protected input, a secret manager, or secured environment variables rather than embedding them in generated source code.
- Do not print, log, commit, or persist plaintext passwords in agent transcripts or project files.
- Grant the account only the minimum required Milvus privileges and avoid wildcard database or collection scope unless explicitly required.
- Add an explicit warning that documentation credentials must never be used in development, staging, or production.
- Rotate credentials immediately in any deployment where these examples were executed unchanged.
A safer example would be:
python import getpass password = getpass.getpass("Enter a unique password for the analyst user: ") client.create_user(user_name="analyst", password=password)- Replace all literal passwords with unmistakable placeholders, such as
