Skip to content

Comments

SnakeYaml SafeConstructor restricting deserialization#6319

Merged
eddumelendez merged 3 commits intotestcontainers:mainfrom
julianladisch:snakeyaml-deserialization
Jul 4, 2023
Merged

SnakeYaml SafeConstructor restricting deserialization#6319
eddumelendez merged 3 commits intotestcontainers:mainfrom
julianladisch:snakeyaml-deserialization

Conversation

@julianladisch
Copy link
Contributor

ParsedDockerComposeFile is vulnerable to deserialization gadget chain attacks that can lead to remote code execution when the file has untrusted content: https://nvd.nist.gov/vuln/detail/CVE-2022-1471

This should be fixed by using SafeConstructor as suggested by the SnakeYaml developers.

Deserialization of arbitrary Java types is not used by the Compose file spec and therefore can be disabled without any loss of functionality: https://docs.docker.com/compose/compose-file/

ParsedDockerComposeFile is vulnerable to deserialization gadget chain attacks
that can lead to remote code execution when the file has untrusted content:
https://nvd.nist.gov/vuln/detail/CVE-2022-1471

This should be fixed by using SafeConstructor as suggested by the SnakeYaml
developers.

Deserialization of arbitrary Java types is not used by the Compose file spec
and therefore can be disabled without any loss of functionality:
https://docs.docker.com/compose/compose-file/
@julianladisch julianladisch requested a review from a team December 22, 2022 11:31
@eddumelendez eddumelendez added this to the next milestone Jul 4, 2023
@eddumelendez eddumelendez added the security Pull requests that address a security vulnerability label Jul 4, 2023
@eddumelendez eddumelendez merged commit 595076c into testcontainers:main Jul 4, 2023
@eddumelendez
Copy link
Member

Thanks for your contribution, @julianladisch !

@julianladisch julianladisch deleted the snakeyaml-deserialization branch July 7, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Pull requests that address a security vulnerability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants