php-twig — security advisory
Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads templates for which the name is a user input. It is possible to use the `source` or `include` statement to read arbitrary files from outside the templates' directory when using a namespace like `@somewhere/../some.file`. In such a case, validation is bypassed. Versions 1.44.7, 2.15.3, and 3.4.3 contain a fix for validation of such template names. There are no known workarounds aside from upgrading.
- Products
- php-twig
- Affected versions
- Not specified
- Fixed versions
- 3.4.3-1
- CVEs
- CVE-2022-39261
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 15:31 UTC · Revision 1
Source evidence
Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads templates for which the name is a user input. It is possible to use the `source` or `include` statement to read arbitrary files from outside the templates' directory when using a namespace like `@somewhere/../some.file`. In such a case, validation is bypassed. Versions 1.44.7, 2.15.3, and 3.4.3 contain a fix for validation of such template names. There are no known workarounds aside from upgrading.
osv:DEBIAN-CVE-2022-39261
php-twig
Fixed versions: 3.4.3-1
php-twig
Fixed versions: 3.4.3-1
php-twig
Fixed versions: 3.4.3-1
Complete source record
{
"id": "aa2c1be2682156515fe41aff13897d27b36c08d795697242c36773fc5576b8bc",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-39261",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2022-39261",
"summary": "Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads templates for which the name is a user input. It is possible to use the `source` or `include` statement to read arbitrary files from outside the templates' directory when using a namespace like `@somewhere/../some.file`. In such a case, validation is bypassed. Versions 1.44.7, 2.15.3, and 3.4.3 contain a fix for validation of such template names. There are no known workarounds aside from upgrading.",
"evidence": "osv:DEBIAN-CVE-2022-39261",
"products": [
{
"name": {
"value": "php-twig",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.4.3-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "php-twig",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.4.3-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "php-twig",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.4.3-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2022-39261",
"aliases": [
"DEBIAN-CVE-2022-39261"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.4.3-1"
}
]
}
],
"package": {
"name": "php-twig",
"purl": "pkg:deb/debian/php-twig?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-39261.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.4.3-1"
}
]
}
],
"package": {
"name": "php-twig",
"purl": "pkg:deb/debian/php-twig?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-39261.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.4.3-1"
}
]
}
],
"package": {
"name": "php-twig",
"purl": "pkg:deb/debian/php-twig?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-39261.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-15T08:03:05.146507992Z",
"provider": "osv",
"upstream": [
"CVE-2022-39261"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2022-39261"
]
},
"related_cves": [
{
"value": "CVE-2022-39261",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 325097,
"published_at": "2022-09-28T14:15:10.827+00:00"
}