Medium
Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
Type: advisorySources: OSV
Twig is a template language for PHP. When using the ?? operator, output escaping was missing for the expression on the left side of the operator. This vulnerability is fixed in 3.19.0.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-24374
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:32 UTC · Revision 1
Source evidence
Twig fixes a security issue where escaping was missing when using null coalesce operator (??)
core-osv · Original sourcePublished 29 Jan 2025, 15:22 UTC
Twig is a template language for PHP. When using the ?? operator, output escaping was missing for the expression on the left side of the operator. This vulnerability is fixed in 3.19.0.
osv:CVE-2025-24374
Complete source record
{
"id": "36693f77495954ddb05d6a15fd165321763defcef91feb3388852676ebd79d81",
"url": "https://osv.dev/vulnerability/CVE-2025-24374",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Twig fixes a security issue where escaping was missing when using null coalesce operator (??)",
"summary": "Twig is a template language for PHP. When using the ?? operator, output escaping was missing for the expression on the left side of the operator. This vulnerability is fixed in 3.19.0.",
"evidence": "osv:CVE-2025-24374",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2025-24374",
"aliases": [
"CVE-2025-24374",
"GHSA-3xg3-cgvq-2xwr"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/twigphp/twig",
"type": "GIT",
"events": [
{
"introduced": "475ad2dc97d65d8631393e721e7e44fb544f0561"
},
{
"fixed": "d4f8c2b86374f08efc859323dbcd95c590f7124e"
},
{
"fixed": "38576b12f05df3cc871bf68f39ccb46b418334a3"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "3.16.0"
},
{
"fixed": "3.19.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "38576b12f05df3cc871bf68f39ccb46b418334a3"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v3.18.0",
"v3.17.1",
"v3.17.0",
"v3.16.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-24374.json"
}
}
],
"modified": "2026-10-28T02:30:37.407711744Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/24xxx/CVE-2025-24374.json",
"https://github.com/twigphp/Twig/security/advisories/GHSA-3xg3-cgvq-2xwr",
"https://nvd.nist.gov/vuln/detail/CVE-2025-24374",
"https://github.com/twigphp/Twig/commit/38576b12f05df3cc871bf68f39ccb46b418334a3"
],
"provider_metadata": {
"cwe_ids": [
"CWE-74"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/24xxx/CVE-2025-24374.json"
}
},
"related_cves": [
{
"value": "CVE-2025-24374",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504716,
"published_at": "2025-01-29T15:22:34.012+00:00"
}