An issue was discovered in ThoughtWorks GoCD before 21.3.0. An attacker who has compromised a GoCD agent can upload a malicious file into a directory of a GoCD server. They can control the filename but the directory is placed inside of a directory that they can't control.
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Link | Tags |
---|---|
https://www.gocd.org/releases/#21-3-0 | issue tracking release notes vendor advisory |
https://github.com/gocd/gocd/commit/4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595 | third party advisory patch |
https://github.com/gocd/gocd/commit/c22e0428164af25d3e91baabd3f538a41cadc82f | third party advisory patch |
https://blog.sonarsource.com/gocd-vulnerability-chain | exploit third party advisory patch |