Skip to main content

Insecure service configuration - DB

Description

The database server has insecure configurations.

Impact

Access the database and exploit vulnerabilities in the system configuration to affect the service.

Recommendation

Correctly configure the MySQL server.

Threat

Internet user with credentials.

Expected Remediation Time

⌚ 60 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: N
  • Attack complexity: L
  • Privileges required: L
  • User interaction: N
  • Scope: C
  • Confidentiality: L
  • Integrity: L
  • Availability: N

Temporal

  • Exploit code madurity: P
  • Remediation level: O
  • Report confidence: X

Result

  • Vector string: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N/E:P/RL:O/RC:X
  • Score:
    • Base: 6.4
    • Temporal: 5.8
  • Severity:
    • Base: Medium
    • Temporal: Medium

Code Examples

Compliant code

The db server restricts access only to authorized users

version: "3.9"
services:
web:
build: .
ports:
- "8000:80"
depends_on:
- db
db:
image: "/mssql/server"
environment:
SA_PASSWORD: "Your_password123"
ACCEPT_EULA: "Y"
group_permissions
AllowEdit: admin

Non compliant code

The db server allows editing permissions for unauthorized users

version: "3.9"
services:
web:
build: .
ports:
- "8000:80"
depends_on:
- db
db:
image: "/mssql/server"
environment:
SA_PASSWORD: "Your_password123"
ACCEPT_EULA: "Y"
group_permissions
AllowEdit: all

Requirements