diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-97866-VariousPublicTSFEProperties.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-97866-VariousPublicTSFEProperties.rst
new file mode 100644
index 0000000000000000000000000000000000000000..30f65b804fe167724ca6e400fad3c96e7d98d26e
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-97866-VariousPublicTSFEProperties.rst
@@ -0,0 +1,48 @@
+.. include:: /Includes.rst.txt
+
+.. _deprecation-97866-1657185866:
+
+====================================================
+Deprecation: #97866 - Various public TSFE properties
+====================================================
+
+See :issue:`97866`
+
+Description
+===========
+
+The following properties within TypoScriptFrontendController have been deprecated:
+
+* :php:`spamProtectEmailAddresses`
+* :php:`intTarget`
+* :php:`extTarget`
+* :php:`fileTarget`
+* :php:`baseUrl`
+
+All of these properties can be accessed through TypoScript's config array.
+
+
+Impact
+======
+
+Accessing these properties via TypoScript `getData` or via PHP will trigger a PHP deprecation
+notice.
+
+
+Affected installations
+======================
+
+TYPO3 installations with TypoScript options such as :ts:`.data = TSFE:fileTarget` or
+TYPO3 installations with third-party extensions accessing the properties via PHP.
+
+
+Migration
+=========
+
+Migrate the access to these properties to use the config property:
+
+In TypoScript you can access the TypoScript properties directly via
+:ts:`.data = TSFE:config|config|fileTarget` and in PHP code via
+:php:`$GLOBALS['TSFE']->config['config']['fileTarget']`.
+
+.. index:: Frontend, TypoScript, PartiallyScanned, ext:frontend
\ No newline at end of file
diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
index f6b3da6900f998767cd725948429fc200f2ac59d..6f5219a26ed9584438cab5ca92fc5917f4b4267e 100644
--- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
+++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
@@ -24,6 +24,7 @@ use Psr\Log\LogLevel;
 use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
+use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
 use TYPO3\CMS\Core\Configuration\PageTsConfig;
 use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Context\LanguageAspect;
@@ -93,6 +94,15 @@ use TYPO3\CMS\Frontend\Typolink\LinkVarsCalculator;
 class TypoScriptFrontendController implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
+    use PublicPropertyDeprecationTrait;
+
+    protected array $deprecatedPublicProperties = [
+        'intTarget' => '$TSFE->intTarget will be removed in TYPO3 v13.0. Use $TSFE->config[\'config\'][\'intTarget\'] instead.',
+        'extTarget' => '$TSFE->extTarget will be removed in TYPO3 v13.0. Use $TSFE->config[\'config\'][\'extTarget\'] instead.',
+        'fileTarget' => '$TSFE->fileTarget will be removed in TYPO3 v13.0. Use $TSFE->config[\'config\'][\'fileTarget\'] instead.',
+        'spamProtectEmailAddresses' => '$TSFE->spamProtectEmailAddresses will be removed in TYPO3 v13.0. Use $TSFE->config[\'config\'][\'spamProtectEmailAddresses\'] instead.',
+        'baseUrl' => '$TSFE->baseUrl will be removed in TYPO3 v13.0. Use $TSFE->config[\'config\'][\'baseURL\'] instead.',
+    ];
 
     /**
      * The page id (int)
@@ -283,25 +293,29 @@ class TypoScriptFrontendController implements LoggerAwareInterface
     /**
      * Default internal target
      * @var string
+     * @deprecated since TYPO3 v12.0. will be removed in TYPO3 v13.0.
      */
-    public $intTarget = '';
+    protected $intTarget = '';
 
     /**
      * Default external target
      * @var string
+     * @deprecated since TYPO3 v12.0. will be removed in TYPO3 v13.0.
      */
-    public $extTarget = '';
+    protected $extTarget = '';
 
     /**
      * Default file link target
      * @var string
+     * @deprecated since TYPO3 v12.0. will be removed in TYPO3 v13.0.
      */
-    public $fileTarget = '';
+    protected $fileTarget = '';
 
     /**
      * If set, typolink() function encrypts email addresses.
+     * @deprecated since TYPO3 v12.0. will be removed in TYPO3 v13.0.
      */
-    public int $spamProtectEmailAddresses = 0;
+    protected int $spamProtectEmailAddresses = 0;
 
     /**
      * Absolute Reference prefix
@@ -313,6 +327,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      * A string prepared for insertion in all links on the page as url-parameters.
      * Based on configuration in TypoScript where you defined which GET parameters you
      * would like to pass on.
+     * @internal if needed, generate linkVars via LinkVarsCalculator
      */
     public string $linkVars = '';
 
@@ -359,8 +374,9 @@ class TypoScriptFrontendController implements LoggerAwareInterface
     /**
      * The base URL set for the page header.
      * @var string
+     * @deprecated since TYPO3 v12.0. will be removed in TYPO3 v13.0.
      */
-    public $baseUrl = '';
+    protected $baseUrl = '';
 
     /**
      * Page content render object
@@ -1804,10 +1820,8 @@ class TypoScriptFrontendController implements LoggerAwareInterface
     public function preparePageContentGeneration(ServerRequestInterface $request)
     {
         $this->getTimeTracker()->push('Prepare page content generation');
-        // Base url:
-        if (isset($this->config['config']['baseURL'])) {
-            $this->baseUrl = $this->config['config']['baseURL'];
-        }
+        // @deprecated: these properties can be removed in TYPO3 v13.0
+        $this->baseUrl = (string)($this->config['config']['baseURL'] ?? '');
         // Internal and External target defaults
         $this->intTarget = (string)($this->config['config']['intTarget'] ?? '');
         $this->extTarget = (string)($this->config['config']['extTarget'] ?? '');
@@ -1816,6 +1830,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
             $this->logDeprecatedTyposcript('config.spamProtectEmailAddresses = ascii', 'This setting has no effect anymore. Change it to a number between -10 and 10 or remove it completely');
             $this->config['config']['spamProtectEmailAddresses'] = 0;
         }
+        // @deprecated: these properties can be removed in TYPO3 v13.0
         $this->spamProtectEmailAddresses = (int)($this->config['config']['spamProtectEmailAddresses'] ?? 0);
         $this->spamProtectEmailAddresses = MathUtility::forceIntegerInRange($this->spamProtectEmailAddresses, -10, 10, 0);
         // calculate the absolute path prefix
@@ -2287,13 +2302,14 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      *
      * @param string $url Input URL, relative or absolute
      * @return string Processed input value.
+     * @internal only for TYPO3 Core internal purposes. Might be removed at a later point as it was related to RealURL functionality.
      */
     public function baseUrlWrap($url)
     {
-        if ($this->baseUrl) {
+        if ($this->config['config']['baseURL'] ?? false) {
             $urlParts = parse_url($url);
             if (empty($urlParts['scheme']) && $url[0] !== '/') {
-                $url = $this->baseUrl . $url;
+                $url = $this->config['config']['baseURL'] . $url;
             }
         }
         return $url;
diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
index 7e15fbd533abd06860c0c2158e78245976420207..b54ce368c3ac37cfd96fdb8c7fbe5a402b1e9c0f 100644
--- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php
+++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
@@ -376,8 +376,9 @@ class RequestHandler implements RequestHandlerInterface
         }
         $pageRenderer->setHeadTag($headTag);
         $pageRenderer->addInlineComment(GeneralUtility::makeInstance(Typo3Information::class)->getInlineHeaderComment());
-        if ($controller->baseUrl) {
-            $pageRenderer->setBaseUrl($controller->baseUrl);
+        $baseUrl = $controller->config['config']['baseURL'] ?? '';
+        if ($baseUrl) {
+            $pageRenderer->setBaseUrl($baseUrl);
         }
         if ($controller->pSetup['shortcutIcon'] ?? false) {
             try {
diff --git a/typo3/sysext/frontend/Classes/Typolink/EmailLinkBuilder.php b/typo3/sysext/frontend/Classes/Typolink/EmailLinkBuilder.php
index 5dbdcc7501e2515375725f259034be829ea3c78c..7f23174e9af6138f30bfc28022a568525d1dc7f8 100644
--- a/typo3/sysext/frontend/Classes/Typolink/EmailLinkBuilder.php
+++ b/typo3/sysext/frontend/Classes/Typolink/EmailLinkBuilder.php
@@ -21,6 +21,7 @@ use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
 use TYPO3\CMS\Core\LinkHandling\LinkService;
 use TYPO3\CMS\Core\Page\DefaultJavaScriptAssetTrait;
+use TYPO3\CMS\Core\Utility\MathUtility;
 
 /**
  * Builds a TypoLink to an email address, also takes care of additional functionality for the time being
@@ -64,11 +65,14 @@ class EmailLinkBuilder extends AbstractTypolinkBuilder implements LoggerAwareInt
 
         // no processing happened, therefore, the default processing kicks in
         $tsfe = $this->getTypoScriptFrontendController();
-        if ($tsfe->spamProtectEmailAddresses) {
-            $mailToUrl = $this->encryptEmail($mailToUrl, $tsfe->spamProtectEmailAddresses);
+        $spamProtectEmailAddresses = (int)($tsfe->config['config']['spamProtectEmailAddresses'] ?? 0);
+        $spamProtectEmailAddresses = MathUtility::forceIntegerInRange($spamProtectEmailAddresses, -10, 10, 0);
+
+        if ($spamProtectEmailAddresses) {
+            $mailToUrl = $this->encryptEmail($mailToUrl, $spamProtectEmailAddresses);
             $attributes = [
                 'data-mailto-token' => $mailToUrl,
-                'data-mailto-vector' => $tsfe->spamProtectEmailAddresses,
+                'data-mailto-vector' => $spamProtectEmailAddresses,
             ];
             $mailToUrl = '#';
             $this->addDefaultFrontendJavaScript();
diff --git a/typo3/sysext/frontend/Classes/Typolink/ExternalUrlLinkBuilder.php b/typo3/sysext/frontend/Classes/Typolink/ExternalUrlLinkBuilder.php
index 30fdbd9f51ab3df0637d5e1449f850ceb086b525..add64d074b2a31d2ca85321ab9a267babf8b38a0 100644
--- a/typo3/sysext/frontend/Classes/Typolink/ExternalUrlLinkBuilder.php
+++ b/typo3/sysext/frontend/Classes/Typolink/ExternalUrlLinkBuilder.php
@@ -31,7 +31,7 @@ class ExternalUrlLinkBuilder extends AbstractTypolinkBuilder
         return (new LinkResult(LinkService::TYPE_URL, (string)$url))
             ->withLinkConfiguration($conf)
             ->withTarget(
-                $target ?: $this->resolveTargetAttribute($conf, 'extTarget', true, $this->getTypoScriptFrontendController()->extTarget),
+                $target ?: $this->resolveTargetAttribute($conf, 'extTarget', true, (string)($this->getTypoScriptFrontendController()->config['config']['extTarget'] ?? '')),
             )
             ->withLinkText($linkText);
     }
diff --git a/typo3/sysext/frontend/Classes/Typolink/FileOrFolderLinkBuilder.php b/typo3/sysext/frontend/Classes/Typolink/FileOrFolderLinkBuilder.php
index 2ddcbe61f506e01b13765f34a86ef2d4a1b18e4f..d3496a1ff9ce8610253c8089acfe9ce9fb166841 100644
--- a/typo3/sysext/frontend/Classes/Typolink/FileOrFolderLinkBuilder.php
+++ b/typo3/sysext/frontend/Classes/Typolink/FileOrFolderLinkBuilder.php
@@ -50,7 +50,7 @@ class FileOrFolderLinkBuilder extends AbstractTypolinkBuilder
             $url .= '#' . $linkDetails['fragment'];
         }
         return (new LinkResult($linkDetails['type'], $this->forceAbsoluteUrl($url, $conf)))
-            ->withTarget($target ?: $this->resolveTargetAttribute($conf, 'fileTarget', false, $this->getTypoScriptFrontendController()->fileTarget))
+            ->withTarget($target ?: $this->resolveTargetAttribute($conf, 'fileTarget', false, (string)($this->getTypoScriptFrontendController()->config['config']['fileTarget'] ?? '')))
             ->withLinkText($linkText);
     }
 }
diff --git a/typo3/sysext/frontend/Classes/Typolink/LegacyLinkBuilder.php b/typo3/sysext/frontend/Classes/Typolink/LegacyLinkBuilder.php
index 713219ac51c6c81ec8610916b04cb886794cddc4..cf8b913d8cdb583324024bee3540c500d124658e 100644
--- a/typo3/sysext/frontend/Classes/Typolink/LegacyLinkBuilder.php
+++ b/typo3/sysext/frontend/Classes/Typolink/LegacyLinkBuilder.php
@@ -36,10 +36,10 @@ class LegacyLinkBuilder extends AbstractTypolinkBuilder
             $linkLocation = (!str_starts_with($linkLocation, '/') ? $tsfe->absRefPrefix : '') . $linkLocation;
             $url = $linkLocation;
             $url = $this->forceAbsoluteUrl($url, $conf);
-            $target = $target ?: $this->resolveTargetAttribute($conf, 'fileTarget', false, $tsfe->fileTarget);
+            $target = $target ?: $this->resolveTargetAttribute($conf, 'fileTarget', false, (string)($tsfe->config['config']['fileTarget'] ?? ''));
         } elseif ($linkDetails['url']) {
             $linkDetails['type'] = LinkService::TYPE_URL;
-            $target = $target ?: $this->resolveTargetAttribute($conf, 'extTarget', true, $tsfe->extTarget);
+            $target = $target ?: $this->resolveTargetAttribute($conf, 'extTarget', true, (string)($tsfe->config['config']['extTarget'] ?? ''));
             $linkText = $this->encodeFallbackLinkTextIfLinkTextIsEmpty($linkText, $linkDetails['url']);
             $url = $linkDetails['url'];
         } else {
diff --git a/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php b/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
index d0321627176e2d5b9e4e2796818fb35fc0ec1f41..d7b788d9767150eb772902b2bbedb046977a4084 100644
--- a/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
+++ b/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
@@ -304,11 +304,11 @@ class PageLinkBuilder extends AbstractTypolinkBuilder
     {
         $tsfe = $this->getTypoScriptFrontendController();
         if ($treatAsExternalLink) {
-            $target = $target ?: $this->resolveTargetAttribute($conf, 'extTarget', false, $tsfe->extTarget);
+            $target = $target ?: $this->resolveTargetAttribute($conf, 'extTarget', false, (string)($tsfe->config['config']['extTarget'] ?? ''));
         } else {
             $target = (isset($page['target']) && trim($page['target'])) ? $page['target'] : $target;
             if (empty($target)) {
-                $target = $this->resolveTargetAttribute($conf, 'target', true, $tsfe->intTarget);
+                $target = $this->resolveTargetAttribute($conf, 'target', true, (string)($tsfe->config['config']['intTarget'] ?? ''));
             }
         }
         return $target;
diff --git a/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php b/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php
index b3712ef69b42521740271920c438d2930842c540..fa534e92981dd2a601c257b8fccebc6dcf4a6a78 100644
--- a/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php
+++ b/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php
@@ -353,7 +353,7 @@ class ContentObjectRendererTest extends FunctionalTestCase
         $tsfe = $this->getMockBuilder(TypoScriptFrontendController::class)->disableOriginalConstructor()->getMock();
         $subject = new ContentObjectRenderer($tsfe);
 
-        $tsfe->spamProtectEmailAddresses = 1;
+        $tsfe->config['config']['spamProtectEmailAddresses'] = 1;
         $result = $subject->typoLink('Send me an email', ['parameter' => 'mailto:test@example.com']);
         self::assertEquals('<a href="#" data-mailto-token="nbjmup+uftuAfybnqmf/dpn" data-mailto-vector="1">Send me an email</a>', $result);
     }
diff --git a/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php b/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
index ecf079b7fa37b4bb2e3030929f538f41d6273c32..d29bef5df5bfbf7a87df2d5592f255075d0abee0 100644
--- a/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
+++ b/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
@@ -1199,8 +1199,8 @@ class ContentObjectRendererTest extends UnitTestCase
      */
     public function getDataWithTypeTsfe(): void
     {
-        $GLOBALS['TSFE']->intTarget = 'foo';
-        self::assertEquals($GLOBALS['TSFE']->intTarget, $this->subject->getData('tsfe:intTarget'));
+        $GLOBALS['TSFE']->linkVars = 'foo';
+        self::assertEquals($GLOBALS['TSFE']->linkVars, $this->subject->getData('tsfe:linkVars'));
     }
 
     /**
@@ -2721,7 +2721,6 @@ class ContentObjectRendererTest extends UnitTestCase
         string $mailAddress,
         string $expected
     ): void {
-        $this->getFrontendController()->spamProtectEmailAddresses = $settings['spamProtectEmailAddresses'];
         $this->getFrontendController()->config['config'] = $settings;
         $typoScript = ['parameter' => $mailAddress];
         GeneralUtility::addInstance(LinkFactory::class, $this->getLinkFactory());
diff --git a/typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php b/typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
index f4d35dcf2da8fbab2002c3ce02ae269a20ac9fb6..45a7c6ec1d21d4ce06227f75db6f61b28c76d44c 100644
--- a/typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
+++ b/typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
@@ -273,7 +273,7 @@ class TypoScriptFrontendControllerTest extends UnitTestCase
      */
     public function baseUrlWrapHandlesDifferentUrls(string $baseUrl, string $url, string $expected): void
     {
-        $this->subject->baseUrl = $baseUrl;
+        $this->subject->config['config']['baseURL'] = $baseUrl;
         self::assertSame($expected, $this->subject->baseUrlWrap($url));
     }
 
diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php
index c1d6050d39c0ec3b622dff010260aba324ab826e..c8bb6443a3bdacf2dac3f4348765d4b29406bd5f 100644
--- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php
+++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php
@@ -964,4 +964,29 @@ return [
             'Deprecation-97549-ContentObjectRenderer-lastTypoLinkProperties.rst',
         ],
     ],
+    'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->spamProtectEmailAddresses' => [
+        'restFiles' => [
+            'Deprecation-97866-VariousPublicTSFEProperties.rst',
+        ],
+    ],
+    'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->intTarget' => [
+        'restFiles' => [
+            'Deprecation-97866-VariousPublicTSFEProperties.rst',
+        ],
+    ],
+    'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->extTarget' => [
+        'restFiles' => [
+            'Deprecation-97866-VariousPublicTSFEProperties.rst',
+        ],
+    ],
+    'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->fileTarget' => [
+        'restFiles' => [
+            'Deprecation-97866-VariousPublicTSFEProperties.rst',
+        ],
+    ],
+    'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->baseUrl' => [
+        'restFiles' => [
+            'Deprecation-97866-VariousPublicTSFEProperties.rst',
+        ],
+    ],
 ];