lovasoa/sqlpage · Security

SQLpage vulnerable to public exposure of database credentials

GHSA ID
GHSA-v5wf-jg37-r9m5
CVE ID
CVE-2023-42454
Severity
critical
Published
Updated
CVSS
10 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
CVSS v3
10 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

Description

Impact

If

  • you are using a SQLPage version older than v0.11.1
  • your SQLPage instance is exposed publicly
  • the database connection string is specified in the sqlpage/sqlpage.json configuration file (not in an environment variable)
  • the web_root is the current working directory (the default)
  • your database is exposed publicly

then an attacker could retrieve the database connection information from SQLPage and use it to connect to your database directly.

Patches

Upgrade to v0.11.1 as soon as possible.

Workarounds

If you cannot upgrade immediately:

  • Using an environment variable instead of the configuration file to specify the database connection string prevents exposing it on vulnerable versions.
  • Using a different web root (that is not a parent of the SQLPage configuration directory) fixes the issue.
  • And in any case, you should generally avoid exposing your database publicly

References

https://github.com/lovasoa/SQLpage/issues/89

CWEs

References