CVE-2025-56157: Default credentials in Dify thru 1.5.1.
Default credentials in Dify thru 1.5.1. PostgreSQL username and password specified in the docker-compose.yaml file included in its source code. NOTE: the Supplier reports that the Docker configuration does not make PostgreSQL (on TCP port 5432) exposed by default in version 1.0.1 or later.
Security readout for executives and security teams
Plain-English summary
Dify source included default PostgreSQL credentials in Docker Compose through 1.5.1. The main business risk is unauthorized database access if an organization deployed with those defaults and exposed PostgreSQL. Supplier notes say PostgreSQL is not exposed by default in Docker configuration from 1.0.1 onward.
Executive priority
Treat as urgent for internet-exposed or unchanged self-hosted deployments. Prioritize credential rotation and network exposure review before broader vulnerability backlog work. If PostgreSQL was never exposed and credentials were changed, residual urgency is lower.
Technical view
CVE-2025-56157 is CWE-798: hard-coded/default credentials for PostgreSQL in Dify docker-compose.yaml. CVSS is 9.8, assuming network access to the service. Public evidence does not confirm default external exposure for 1.0.1 or later, and affected CPE metadata is not populated.
Likely exposure
Most likely exposure is self-hosted Dify using the bundled Docker Compose with unchanged PostgreSQL credentials, especially where port 5432 is reachable. Managed or modified deployments cannot be assessed from the supplied sources.
Exploitation context
The bundle does not show KEV listing or confirmed active exploitation. Exploitability depends on whether PostgreSQL is reachable and default credentials remain valid. Supplier commentary narrows default exposure for version 1.0.1 and later.
Researcher notes
The CVE record states Dify through 1.5.1, but affected vendor/product fields are n/a. The supplier note materially affects risk: Docker configuration reportedly does not expose PostgreSQL by default in 1.0.1 or later. Validate deployment reality before assuming critical exposure.
Mitigation direction
Check Dify vendor guidance and the linked issue or PR for official remediation status.
Change any default PostgreSQL username and password used by deployed Dify environments.
Ensure PostgreSQL is not exposed to untrusted networks or the public internet.
Review Docker Compose overrides, firewall rules, and cloud security groups for port 5432 exposure.
Upgrade or redeploy according to confirmed Dify release guidance when available.
Validation and detection
Inventory self-hosted Dify deployments and record their deployed version and deployment method.
Inspect Docker Compose configuration for default PostgreSQL credentials or inherited examples.
Confirm PostgreSQL is only reachable from intended internal services or networks.
Review database authentication logs for unexpected successful or failed access attempts.
Verify rotated credentials are used consistently by Dify services and PostgreSQL.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-798: Credential and account abuse lookup
Authentication and credential weaknesses can make valid-account abuse and credential telemetry useful review starting points. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
8Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: yesTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-798 · source CWE mapping
Use of Hard-coded Credentials
Use of Hard-coded Credentials represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.