Description
Versions of the package io.pebbletemplates:pebble from 0 and before 4.1.0 are vulnerable to External Control of File Name or Path via the include tag. A high privileged attacker can access sensitive local files by crafting malicious notification templates that leverage this tag to include files like /etc/passwd or /proc/1/environ. Workaround This vulnerability can be mitigated by disabling the include macro in Pebble Templates: java new PebbleEngine.Builder() .registerExtensionCustomizer(new DisallowExtensionCustomizerBuilder() .disallowedTokenParserTags(List.of("include")) .build()) .build();
Problem types
External Control of File Name or Path
Credits
Jonathan Leitschuh
References
security.snyk.io/vuln/SNYK-JAVA-IOPEBBLETEMPLATES-8745594
github.com/PebbleTemplates/pebble/pull/715
security.snyk.io/vuln/SNYK-JAVA-IOPEBBLETEMPLATES-8745594
github.com/PebbleTemplates/pebble/issues/680
pebbletemplates.io/wiki/tag/include
github.com/PebbleTemplates/pebble/issues/688
github.com/...ommit/b3451c8f305a1a248fbcc2363fd307d0baaee329