This repository was archived by the owner on Jun 1, 2026. It is now read-only.
security: CWE-1188: Harbor admin password override — VC-53730#146
Open
torresashjiancyber wants to merge 1 commit into
Open
security: CWE-1188: Harbor admin password override — VC-53730#146torresashjiancyber wants to merge 1 commit into
torresashjiancyber wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR remediates CWE-1188 (Insecure Default Initialization) by ensuring the Harbor admin password is set from the CloudFormation
AdminPasswordparameter instead of using Harbor's default password.Finding
Vulnerability: Harbor registry deployed with default admin credentials
CVSS: 8.2 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N)
CWE: CWE-1188 (Insecure Default Initialization) / CWE-521 (Weak Password Requirements)
The Harbor deployment in
scripts/registry/harbor_ec2.yamlaccepted anAdminPasswordCloudFormation parameter but never used it to configure Harbor. Harbor would deploy with its well-known default password (Harbor12345), allowing any attacker who can reach the Harbor endpoint to authenticate as admin with default credentials.Remediation
Changes made:
scripts/registry/harbor_ec2.yaml: Addedsedcommand in UserData script to setharbor_admin_passwordinharbor.ymlusing theAdminPasswordparameter valuescripts/registry/env-vars-template.sh: Updated template to remove hardcoded default password and instruct users to set password matching their CloudFormation deploymentApproach: Minimal, focused fix that:
Verification
reports/VC-53730/Security impact: Harbor instances deployed with this fix will no longer use default credentials. The admin password is set to the value provided in the CloudFormation
AdminPasswordparameter (which requires minimum 8 characters per the parameter constraint).