Skip to content

Commit

Permalink
Use best practice YAML parsing. Add security contact to README. [BW-8…
Browse files Browse the repository at this point in the history
  • Loading branch information
aednichols authored Oct 1, 2021
1 parent e2c72e1 commit 75785d2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Cromwell Change Log

## 70 Release Notes

### CWL security fix [#6510](https://github.com/broadinstitute/cromwell/pull/6510)

Fixed an issue that could allow submission of an untrusted CWL file to initiate remote code execution. The vector was improper deserialization of the YAML source file.

CWL execution is enabled by default unless a `CWL` [stanza](https://github.com/broadinstitute/cromwell/blob/develop/core/src/main/resources/reference.conf#L460-L482) is present in the configuration that specifies `enabled: false`. Cromwell instances with CWL disabled were not affected. Consequently, users who wish to mitigate the vulnerability without upgrading Cromwell may do so via this config change.

- Thank you to [Bruno P. Kinoshita](https://github.com/kinow) who first found the issue in a different CWL project ([CVE-2021-41110](https://github.com/common-workflow-language/cwlviewer/security/advisories/GHSA-7g7j-f5g3-fqp7)) and [Michael R. Crusoe](https://github.com/mr-c) who suggested we investigate ours.

## 68 Release Notes

### Virtual Private Cloud
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Users with specialized needs who wish to install and maintain their own Cromwell

Cromwell [supports](https://cromwell.readthedocs.io/en/stable/LanguageSupport/) the WDL and CWL workflow languages. The Cromwell team is actively developing WDL, while maintenance for CWL is primarily community-based.

### Security reports

If you believe you have found a security issue please contact `[email protected]`.

### Issue tracking in JIRA

<!--
Expand Down
4 changes: 2 additions & 2 deletions wom/src/main/scala/wom/util/YamlUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import net.ceedubs.ficus.readers.ValueReader
import org.yaml.snakeyaml.LoaderOptions
import org.yaml.snakeyaml.comments.CommentLine
import org.yaml.snakeyaml.composer.Composer
import org.yaml.snakeyaml.constructor.Constructor
import org.yaml.snakeyaml.constructor.SafeConstructor
import org.yaml.snakeyaml.nodes.{MappingNode, Node, NodeTuple}
import org.yaml.snakeyaml.parser.ParserImpl
import org.yaml.snakeyaml.reader.StreamReader
Expand All @@ -38,7 +38,7 @@ object YamlUtils {
maxDepth: Int Refined NonNegative = defaultMaxDepth
): Either[ParsingFailure, Json] = {
try {
val yamlConstructor = new Constructor()
val yamlConstructor = new SafeConstructor()
val yamlComposer = new MaxDepthComposer(yaml, maxDepth)
yamlConstructor.setComposer(yamlComposer)
val parsed = yamlConstructor.getSingleData(classOf[AnyRef])
Expand Down

0 comments on commit 75785d2

Please sign in to comment.