-
Notifications
You must be signed in to change notification settings - Fork 0
Update dependency twig/twig to v3 [SECURITY] #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/packagist-twig-twig-vulnerability
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.0||^2.0->3.11.2GitHub Vulnerability Alerts
CVE-2019-9942
A sandbox information disclosure exists in Twig before 1.38.0 and 2.x before 2.7.0 because, under some circumstances, it is possible to call the
__toString()method on an object even if not allowed by the security policy in place.CVE-2022-39261
Description
When using the filesystem loader to load templates for which the name is a user input, it is possible to use the
sourceorincludestatement to read arbitrary files from outside the templates directory when using a namespace like@somewhere/../some.file(in such a case, validation is bypassed).Resolution
We fixed validation for such template names.
Even if the 1.x branch is not maintained anymore, a new version has been released.
Credits
We would like to thank Dariusz Tytko for reporting the issue and Fabien Potencier for fixing the issue.
CVE-2024-45411
Description
Under some circumstances, the sandbox security checks are not run which allows user-contributed templates to bypass the sandbox restrictions.
The security issue happens when all these conditions are met:
include()function which references a template name (likeincluded.twig) and not aTemplateorTemplateWrapperinstance;include()call but in a non-sandbox context (possible as the sandbox has been globally disabled).Resolution
The patch ensures that the sandbox security checks are always run at runtime.
Credits
We would like to thank Fabien Potencier for reporting and fixing the issue.
CVE-2024-51754
Description
In a sandbox, an attacker can call
__toString()on an object even if the__toString()method is not allowed by the security policy when the object is part of an array or an argument list (arguments to a function or a filter for instance).Resolution
The sandbox mode now checks the
__toString()method call on all objects.The patch for this issue is available here for the 3.11.x branch, and here for the 3.x branch.
Credits
We would like to thank Jamie Schouten for reporting the issue and Fabien Potencier for providing the fix.
CVE-2024-51755
Description
In a sandbox, and attacker can access attributes of Array-like objects as they were not checked by the security policy.
They are now checked via the property policy and the
__isset()method is now called after the security check.This is a BC break.
Resolution
The sandbox mode now ensures access to array-like's properties is allowed.
The patch for this issue is available here for the 3.11.x branch, and here for the 3.x branch.
Credits
We would like to thank Jamie Schouten for reporting the issue and Nicolas Grekas for providing the fix.
Release Notes
twigphp/Twig (twig/twig)
v3.11.2Compare Source
They are now checked via the property policy
toString()under some circumstances on an object even if the
__toString()method is not allowed by the security policyv3.11.1Compare Source
v3.11.0Compare Source
OptimizerNodeVisitor::OPTIMIZE_RAW_FILTERTwig\Cache\ChainCacheandTwig\Cache\ReadOnlyFilesystemCacheNodedeprecatedtagConstantExpressionas being@finalfindfilterOptimizerNodeVisitorPrintNodeshufflefiltersingularandpluralfilters inStringExtensionTwig\Node\Expression\CallExpression::compileArguments()Twig\ExpressionParser\parseHashExpression()in favor ofTwig\ExpressionParser::parseMappingExpression()Twig\ExpressionParser\parseArrayExpression()in favor ofTwig\ExpressionParser::parseSequenceExpression()sequenceandmappingtestsTwig\Node\Expression\NameExpression::isSimple()andTwig\Node\Expression\NameExpression::isSpecial()v3.10.3Compare Source
v3.10.2Compare Source
v3.10.1Compare Source
v3.10.0Compare Source
Make
CoreExtension::formatDate,CoreExtension::convertDate, andCoreExtension::formatNumberpart of the public APIAdd
needs_charsetoption for filters and functionsExtract the escaping logic from the
EscaperExtensionclass to a newEscaperRuntimeclass.The following methods from
Twig\\Extension\\EscaperExtensionaredeprecated:
setEscaper(),getEscapers(),setSafeClasses,addSafeClasses(). Use the same methods on theTwig\\Runtime\\EscaperRuntimeclass instead.Fix capturing output from extensions that still use echo
Fix a PHP warning in the Lexer on malformed templates
Fix blocks not available under some circumstances
Synchronize source context in templates when setting a Node on a Node
v3.9.3Compare Source
twig_escape_filter_is_safedeprecated functionv3.9.2Compare Source
v3.9.1Compare Source
$blocksvariable inCaptureNodev3.9.0Compare Source
Node implementations that use "echo" or "print" should use "yield" instead;
all Node implementations should be flagged with
#[YieldReady]once they've been made ready for "yield";the "use_yield" Environment option can be turned on when all nodes have been made
#[YieldReady];"yield" will be the only strategy supported in the next major version
v3.8.0Compare Source
twig_test_iterablefunction. Use the nativeis_iterableinstead.v3.7.1Compare Source
v3.7.0Compare Source
v3.6.1Compare Source
v3.6.0Compare Source
v3.5.1Compare Source
v3.5.0Compare Source
constantifnodes when outside of a block and with an empty bodyv3.4.3Compare Source
v3.4.2Compare Source
v3.4.1Compare Source
v3.4.0Compare Source
v3.3.10Compare Source
v3.3.9Compare Source
v3.3.8Compare Source
sortfilter must require a Closure for thearrowparameterroundconvertToHtmlmethodv3.3.7Compare Source
v3.3.6Compare Source
v3.3.5Compare Source
v3.3.4Compare Source
v3.3.3Compare Source
v3.3.2Compare Source
v3.3.1Compare Source
v3.3.0Compare Source
v3.2.1Compare Source
v3.1.1Compare Source
v3.1.0Compare Source
v3.0.5Compare Source
v3.0.4Compare Source
v3.0.3Compare Source
v3.0.2Compare Source
v3.0.1Compare Source
v3.0.0Compare Source
v2.16.1Compare Source
v2.16.0Compare Source
v2.15.6Compare Source
v2.15.5Compare Source
v2.15.4Compare Source
v2.15.3Compare Source
v2.15.2Compare Source
v2.15.1Compare Source
v2.15.0Compare Source
v2.14.13Compare Source
v2.14.12Compare Source
v2.14.11Compare Source
v2.14.10Compare Source
v2.14.9Compare Source
v2.14.8Compare Source
v2.14.7Compare Source
v2.14.6Compare Source
v2.14.5Compare Source
v2.14.4Compare Source
v2.14.3Compare Source
v2.14.2Compare Source
v2.14.1Compare Source
v2.14.0Compare Source
v2.13.1Compare Source
v2.13.0Compare Source
v2.12.5Compare Source
v2.12.4Compare Source
v2.12.3Compare Source
v2.12.2Compare Source
v2.12.1Compare Source
v2.12.0Compare Source
v2.11.3Compare Source
v2.11.2Compare Source
v2.11.1Compare Source
v2.11.0Compare Source
v2.10.0Compare Source
v2.9.0Compare Source
v2.8.1Compare Source
v2.8.0Compare Source
v2.7.4Compare Source
v2.7.3Compare Source
v2.7.2Compare Source
v2.7.1Compare Source
v2.7.0Compare Source
v2.6.2Compare Source
v2.6.1Compare Source
v2.6.0Compare Source
v2.5.0Compare Source
v2.4.8Compare Source
v2.4.7Compare Source
v2.4.6Compare Source
v2.4.5Compare Source
v2.4.4Compare Source
v2.4.3Compare Source
v2.4.2Compare Source
v2.4.1Compare Source
v2.4.0Compare Source
v2.3.2Compare Source
v2.3.1Compare Source
v2.3.0Compare Source
v2.2.0Compare Source
v2.1.0Compare Source
v2.0.0Compare Source
v1.44.8Compare Source
v1.44.7Compare Source
v1.44.6Compare Source
v1.44.5Compare Source
v1.44.4Compare Source
v1.44.3Compare Source
v1.44.2Compare Source
v1.44.1Compare Source
v1.44.0Compare Source
v1.43.1Compare Source
v1.43.0Compare Source
v1.42.5Compare Source
v1.42.4Compare Source
v1.42.3Compare Source
v1.42.2Compare Source
v1.42.1Compare Source
v1.42.0Compare Source
v1.41.0Compare Source
v1.40.1Compare Source
v1.40.0Compare Source
v1.39.1Compare Source
v1.39.0Compare Source
v1.38.4Compare Source
v1.38.3Compare Source
v1.38.2Compare Source
v1.38.1Compare Source
v1.38.0Compare Source
v1.37.1Compare Source
v1.37.0Compare Source
v1.36.0Compare Source
v1.35.4Compare Source
v1.35.3Compare Source
v1.35.2Compare Source
v1.35.1Compare Source
v1.35.0Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.