Skip to content

GHSA-m2hh-2m46-x6j5

silverstripe/framework may disclose database credentials during connection failure

Medium Packagist
Severity
6.5 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
CWE-209 Generation of Error Message Containing Sensitive Information
Fix
3.7.1
Upgrade silverstripe/framework to this version or later

Description

When running SilverStripe 3.7 or 4.x in dev mode with the mysqli database driver, there is a potential to disclose the connection details.

We have blacklisted the sensitive parts of the connection information from being included in dev mode stack traces when database errors occur.

Affected versions

Packagist

PackageVulnerableFixed in
silverstripe/framework
>= 3.7.0-rc1, < 3.7.1
3.7.1
silverstripe/framework
>= 4.0.0-rc1, < 4.0.5
4.0.5
silverstripe/framework
>= 4.1.0-rc1, < 4.1.3
4.1.3
silverstripe/framework
>= 4.2.0-rc1, < 4.2.2
4.2.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

silverstripe/framework Packagist → 3.7.1

composer
composer require silverstripe/framework:^3.7.1

Severity breakdown

CVSS 3.1 6.5

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-209: Generation of Error Message Containing Sensitive Information

The product generates an error message that includes sensitive information about its environment, users, or associated data.

How to prevent it
  • Implementation: Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
  • Implementation: Handle exceptions internally and do not display errors containing potentially sensitive information to a user.
  • Implementation: Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
  • Implementation, Build and Compilation: Debugging information should not make its way into a production release.
  • Implementation, Build and Compilation: Debugging information should not make its way into a production release.
  • System Configuration: Where available, configure the environment to use less verbose error messages. For example, in PHP, disable the display_errors setting during configuration, or at runtime using the error_reporting() function.
  • System Configuration: Create default error pages or messages that do not leak any information.

References

Timeline

  1. Published
  2. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-gvrw-qqp5-jgc5
Silverstripe Framework: Possible XSS attack through media embed
Medium Also affects silverstripe/framework
GHSA-256q-hx8w-xcqx
Silverstripe Framework user enumeration via timing attack on login and password reset forms
Medium Also affects silverstripe/framework
GHSA-rhx4-hvx9-j387
Silverstripe Framework has a XSS vulnerability in HTML editor
Medium Also affects silverstripe/framework
GHSA-74j9-xhqr-6qv3
Reflected Cross Site Scripting (XSS) in error message
Low Also affects silverstripe/framework
GHSA-mqf3-qpc3-g26q
Silverstripe Framework has a Reflected Cross Site Scripting (XSS) in error message
Low Also affects silverstripe/framework
GHSA-ff6q-3c9c-6cf5
Silverstripe Framework has a XSS in form messages
Medium Also affects silverstripe/framework
GHSA-7cmp-cgg8-4c82
Silverstripe Framework has a XSS via insert media remote file oembed
Medium Also affects silverstripe/framework
GHSA-52cw-pvq9-9m5v
Silverstripe uses TinyMCE which allows svg files linked in object tags
Medium Also affects silverstripe/framework
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor