CVE catalog

CVE-2024-51754

Twig vulnerabilities

[CVE catalog]

Severity
Medium
Published
Source
[NVD] · [CVE record]
EPSS
0.43% · Oct 25, 2026

Twig is a template language for PHP. 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). This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianphp-twigsid3.28.0-1fixed
Debianphp-twigforky3.28.0-1fixed
Debianphp-twigtrixie3.27.0-0+deb13u1fixed
Debianphp-twigtrixie-security3.27.0-0+deb13u1fixed
Debianphp-twigbookworm3.5.1-1+deb12u3fixed
Debianphp-twigbookworm-security3.5.1-1+deb12u3fixed
Ubuntuphp-twignobleNot reportedvulnerable
Ubuntuphp-twignoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-cache-extranoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-cssinliner-extranoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-docnoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-extra-bundlenoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-html-extranoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-inky-extranoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-intl-extranoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-markdown-extranoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntuphp-twig-string-extranoble3.8.0-2ubuntu0.1~esm1fixed
Ubuntutwigpro1.24.0-2ubuntu1vulnerable
Ubuntutwigpro2.4.4-2ubuntu1vulnerable
Ubuntutwigpro2.4.6-1vulnerable
Ubuntutwigpro2.4.6-1ubuntu0.1~esm1vulnerable
Ubuntuphp-twigpro3.7.0-1vulnerable
Ubuntuphp-twigpro3.7.1-1vulnerable
Ubuntuphp-twigpro3.8.0-2vulnerable
Ubuntuphp-twigpro3.8.0-2ubuntu0.1~esm1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianphp-twigsourcesid3.14.2-1not yet assignedNot reported[1086884]
Debianphp-twigsourceforky3.14.2-1not yet assignedNot reported[1086884]
Debianphp-twigsourcetrixie3.14.2-1not yet assignedNot reported[1086884]
Debianphp-twigsourcebookworm3.5.1-1+deb12u3not yet assignedNot reported[1086884]
Ubuntuphp-twigdebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-cache-extradebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-cssinliner-extradebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-docdebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-extra-bundledebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-html-extradebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-inky-extradebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-intl-extradebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-markdown-extradebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twig-string-extradebnoble3.8.0-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-twigdebpro3.8.0-2ubuntu0.1~esm1Not reportedUBUNTU-CVE-2024-51754Not reported

[Debian bug #1086884]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [php-twig]Fixed
    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

  • Source package: [php-twig]

    Details (4)
    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

    • 3.5.1-1+deb12u3 · all · bookworm-security

      Fixed · Fixed: 3.5.1-1+deb12u3

      usn · php-twig · debian · bookworm; usn · php-twig · debian · 12

[Debian 13 (Trixie)]

  • [php-twig]Fixed
    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

  • Source package: [php-twig]

    Details (4)
    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

    • 3.27.0-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 3.14.2-1

      usn · php-twig · debian · 13

Observed:

References