diff --git a/composer.json b/composer.json
index 4e2b1bffad6af2bdbf7ef3c5c21fe7fa8e3fb1f0..60d03464a9ccf3a595f28ef7c95eeab19bf8c568 100644
--- a/composer.json
+++ b/composer.json
@@ -104,7 +104,7 @@
 		"typo3/cms-cli": "^3.1.1",
 		"typo3/cms-composer-installers": "^5.0.1",
 		"typo3/html-sanitizer": "^2.2.0",
-		"typo3fluid/fluid": "^2.15"
+		"typo3fluid/fluid": "^4.0"
 	},
 	"require-dev": {
 		"bnf/phpstan-psr-container": "^1.0.1",
diff --git a/composer.lock b/composer.lock
index 1ba188ae215f4690e64d862381b11fbd4f6367e8..5d5e34d4d59bad7bd3411975410cae5ca1eca325 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "6981656346ae34f00a715da38913e1e1",
+    "content-hash": "fe8921ba17dcc61f9b234440cce66a6a",
     "packages": [
         {
             "name": "bacon/bacon-qr-code",
@@ -4877,29 +4877,31 @@
         },
         {
             "name": "typo3fluid/fluid",
-            "version": "2.15.0",
+            "version": "4.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/TYPO3/Fluid.git",
-                "reference": "0a8ebdb9bab1510380f18bef6395fbb4754c01b7"
+                "reference": "a5d7bd3134035639106cb783681f04cc0f91294d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/TYPO3/Fluid/zipball/0a8ebdb9bab1510380f18bef6395fbb4754c01b7",
-                "reference": "0a8ebdb9bab1510380f18bef6395fbb4754c01b7",
+                "url": "https://api.github.com/repos/TYPO3/Fluid/zipball/a5d7bd3134035639106cb783681f04cc0f91294d",
+                "reference": "a5d7bd3134035639106cb783681f04cc0f91294d",
                 "shasum": ""
             },
             "require": {
                 "ext-mbstring": "*",
-                "php": "^8.1"
+                "php": "^8.2"
             },
             "require-dev": {
                 "ext-json": "*",
                 "ext-simplexml": "*",
                 "friendsofphp/php-cs-fixer": "^3.59.3",
-                "phpstan/phpstan": "^1.10.14",
-                "phpstan/phpstan-phpunit": "^1.3.11",
-                "phpunit/phpunit": "^10.2.6"
+                "phpstan/phpstan": "^1.11.5",
+                "phpstan/phpstan-phpunit": "^1.4.0",
+                "phpunit/phpunit": "^11.2.5",
+                "psr/container": "^2.0",
+                "t3docs/fluid-documentation-generator": "^4.3"
             },
             "suggest": {
                 "ext-json": "PHP JSON is needed when using JSONVariableProvider: A relatively rare use case",
@@ -4925,7 +4927,7 @@
                 "issues": "https://github.com/TYPO3/Fluid/issues",
                 "source": "https://github.com/TYPO3/Fluid"
             },
-            "time": "2024-08-30T21:24:26+00:00"
+            "time": "2024-09-10T16:15:31+00:00"
         },
         {
             "name": "webmozart/assert",
diff --git a/typo3/sysext/adminpanel/composer.json b/typo3/sysext/adminpanel/composer.json
index 3987850b96022e36393119d1e5f3f1bc9f607b6e..ef98d2366506b363a0677e58179bc215c2f5418c 100644
--- a/typo3/sysext/adminpanel/composer.json
+++ b/typo3/sysext/adminpanel/composer.json
@@ -27,7 +27,7 @@
 		"typo3/cms-core": "13.3.*@dev",
 		"typo3/cms-fluid": "13.3.*@dev",
 		"typo3/cms-frontend": "13.3.*@dev",
-		"typo3fluid/fluid": "^2.15"
+		"typo3fluid/fluid": "^4.0"
 	},
 	"conflict": {
 		"typo3/cms": "*"
diff --git a/typo3/sysext/core/Documentation/Changelog/13.3/Feature-104896-RaiseFluidStandaloneTo40.rst b/typo3/sysext/core/Documentation/Changelog/13.3/Feature-104896-RaiseFluidStandaloneTo40.rst
new file mode 100644
index 0000000000000000000000000000000000000000..ab6894151a366e0147d43726e62442391c7b5278
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/13.3/Feature-104896-RaiseFluidStandaloneTo40.rst
@@ -0,0 +1,62 @@
+.. include:: /Includes.rst.txt
+
+.. _feature-104896-1726046146:
+
+================================================
+Feature: #104896 - Raise Fluid Standalone to 4.0
+================================================
+
+See :issue:`104896`
+
+Description
+===========
+
+TYPO3 13 now uses Fluid 4 as the new base version. Old TYPO3 versions
+will keep using Fluid 2, which will still receive bugfixes if necessary.
+For detailed information about this release, please refer to the
+`dedicated release notes on GitHub <https://github.com/TYPO3/Fluid/releases/tag/4.0.0>`_.
+
+With the update to Fluid 4, tag-based ViewHelpers now have proper
+support for boolean attributes. Before this change, it was very
+cumbersome to generate these with Fluid, now it's implemented similar
+to popular JavaScript frameworks by using the newly introduced
+boolean literals:
+
+..  code-block:: html
+
+    <my:viewhelper async="{true}" />
+    Result: <tag async="async" />
+
+    <my:viewhelper async="{false}" />
+    Result: <tag />
+
+
+Of course, any variable containing a boolean can be supplied as well:
+
+..  code-block:: html
+
+    <my:viewhelper async="{isAsync}" />
+
+
+This can also be used in combination with variable casting:
+
+..  code-block:: html
+
+    <my:viewhelper async="{myString as boolean}" />
+
+
+For compatibility reasons empty strings still lead to the attribute
+being omitted from the tag.
+
+
+Impact
+======
+
+For existing installations, negative consequences of this update should be
+minimal as deprecated features will still work. Users are however advised
+to look into the already announced deprecations and to update their code
+accordingly. This update helps with this by now writing log messages to the
+deprecation log (if activated) if any deprecated feature is used in the
+TYPO3 instance.
+
+.. index:: Fluid, ext:fluid
diff --git a/typo3/sysext/core/composer.json b/typo3/sysext/core/composer.json
index d30c6b59d802eb33200f9ac8e1452409f39ec0f7..5855661ffa28e73a4dbd445085092625af9636fb 100644
--- a/typo3/sysext/core/composer.json
+++ b/typo3/sysext/core/composer.json
@@ -74,7 +74,7 @@
 		"typo3/cms-cli": "^3.1.1",
 		"typo3/cms-composer-installers": "^5.0.1",
 		"typo3/html-sanitizer": "^2.2.0",
-		"typo3fluid/fluid": "^2.15"
+		"typo3fluid/fluid": "^4.0"
 	},
 	"suggest": {
 		"ext-apcu": "Needed when non-default APCU based cache backends are used",
diff --git a/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/TextareaViewHelperTest.php b/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/TextareaViewHelperTest.php
index 6e249015d67955dbb89fcb2c77767b4668a19729..6b6814cc7445f6b99e23fd7ecd92a5be2fcf0435 100644
--- a/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/TextareaViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/TextareaViewHelperTest.php
@@ -75,12 +75,12 @@ final class TextareaViewHelperTest extends FunctionalTestCase
             'renderAddsReadonlyTrue' => [
                 '<f:form.textarea name="NameOfTextarea" readonly="{var}" />',
                 ['var' => true],
-                '<textarea readonly="1" name="NameOfTextarea"></textarea>',
+                '<textarea readonly="readonly" name="NameOfTextarea"></textarea>',
             ],
             'renderAddsReadonlyFalse' => [
                 '<f:form.textarea name="NameOfTextarea" readonly="{var}" />',
                 ['var' => false],
-                '<textarea readonly="" name="NameOfTextarea"></textarea>',
+                '<textarea name="NameOfTextarea"></textarea>',
             ],
             'renderAddsReadonlyNull' => [
                 '<f:form.textarea name="NameOfTextarea" readonly="{var}" />',
diff --git a/typo3/sysext/fluid/composer.json b/typo3/sysext/fluid/composer.json
index 026195c01b2097b1588431cbf58dd7fb48336dbe..fd40f45de452b31401aeaebaf708e9c0ba783a29 100644
--- a/typo3/sysext/fluid/composer.json
+++ b/typo3/sysext/fluid/composer.json
@@ -22,7 +22,7 @@
 		"symfony/dependency-injection": "^7.1.4",
 		"typo3/cms-core": "13.3.*@dev",
 		"typo3/cms-extbase": "13.3.*@dev",
-		"typo3fluid/fluid": "^2.15"
+		"typo3fluid/fluid": "^4.0"
 	},
 	"conflict": {
 		"typo3/cms": "*"
diff --git a/typo3/sysext/redirects/composer.json b/typo3/sysext/redirects/composer.json
index 880b67010f284ab19c9c8e861e73ae591bc3571a..7dc9aeed891f0b2b7d6c37633b83a5a74ea74fe5 100644
--- a/typo3/sysext/redirects/composer.json
+++ b/typo3/sysext/redirects/composer.json
@@ -25,7 +25,7 @@
 		"symfony/console": "^7.1.4",
 		"typo3/cms-backend": "13.3.*@dev",
 		"typo3/cms-core": "13.3.*@dev",
-		"typo3fluid/fluid": "^2.15"
+		"typo3fluid/fluid": "^4.0"
 	},
 	"conflict": {
 		"typo3/cms": "*"