Cachet vulnerable to new line injection during configuration edition
The advisory, in context
Impact
Authenticated users, regardless of their privileges (User or Admin), can exploit a new line injection in the configuration edition feature (e.g. mail settings) and gain arbitrary code execution on the server.
Patches
This issue was addressed by improving UpdateConfigCommandHandler and preventing the use of new lines characters in new configuration values.
Workarounds
Only allow trusted source IP addresses to access to the administration dashboard.
References
For more information
If you have any questions or comments about this advisory, you can contact:
- The original reporters, by sending an email to vulnerability.research [at] sonarsource.com;
- The maintainers, by opening an issue on this repository.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
Earlier releases before 2.5.1
Fixed in 2.5.1
56 explicitly affected versions
v0.1.0-alpha, v1.0.0, v1.1.0, v1.1.1, v1.2.0, v1.2.1, v2.0.0, v2.0.0-RC1, v2.0.0-RC2, v2.0.0-RC3, v2.0.0-RC4, v2.0.0-RC5, v2.0.0-beta1, v2.0.0-beta2, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.1.0, v2.1.0-RC1, v2.1.0-RC2, v2.1.1, v2.1.2, v2.2.0, v2.2.0-RC1, v2.2.1, v2.2.2, v2.2.3, v2.2.4, v2.3.0, v2.3.0-RC1, v2.3.0-RC2, v2.3.0-RC3, v2.3.0-RC4, v2.3.0-RC5, v2.3.0-RC6, v2.3.1, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.1
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v0.1.0-alpha",
"v1.0.0",
"v1.1.0",
"v1.1.1",
"v1.2.0",
"v1.2.1",
"v2.0.0",
"v2.0.0-RC1",
"v2.0.0-RC2",
"v2.0.0-RC3",
"v2.0.0-RC4",
"v2.0.0-RC5",
"v2.0.0-beta1",
"v2.0.0-beta2",
"v2.0.1",
"v2.0.2",
"v2.0.3",
"v2.0.4",
"v2.1.0",
"v2.1.0-RC1",
"v2.1.0-RC2",
"v2.1.1",
"v2.1.2",
"v2.2.0",
"v2.2.0-RC1",
"v2.2.1",
"v2.2.2",
"v2.2.3",
"v2.2.4",
"v2.3.0",
"v2.3.0-RC1",
"v2.3.0-RC2",
"v2.3.0-RC3",
"v2.3.0-RC4",
"v2.3.0-RC5",
"v2.3.0-RC6",
"v2.3.1",
"v2.3.10",
"v2.3.11",
"v2.3.12",
"v2.3.13",
"v2.3.14",
"v2.3.15",
"v2.3.16",
"v2.3.17",
"v2.3.18",
"v2.3.2",
"v2.3.3",
"v2.3.4",
"v2.3.5",
"v2.3.6",
"v2.3.7",
"v2.3.8",
"v2.3.9",
"v2.4.0",
"v2.4.1"
]
}References
- https://github.com/fiveai/Cachet/security/advisories/GHSA-9jxw-cfrh-jxq6
- https://nvd.nist.gov/vuln/detail/CVE-2021-39172
- https://github.com/fiveai/Cachet/commit/6442976c25930cb370c65a22784b9caee7ed1de2
- https://blog.sonarsource.com/cachet-code-execution-via-laravel-configuration-injection
- https://github.com/fiveai/Cachet
- https://github.com/fiveai/Cachet/releases/tag/v2.5.1