TYPO3 — 2 vulnerability checks
noctis ships 2 vulnerability checks for TYPO3, covering 11 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
TYPO3 Backend Login Delay Bypass and Multiple Vulnerabilities (TYPO3-CORE-SA-2011-001)
| CVE | CVE-2011-4626, CVE-2011-4627, CVE-2011-4628, CVE-2011-4629, CVE-2011-4630, CVE-2011-4631, CVE-2011-4632, CVE-2011-4901, CVE-2011-4902, CVE-2011-4903 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/typo3/typo3-core-sa-2011-001.yaml |
Tests the TYPO3 backend login (/typo3/index.php, also under /cms) for the authentication delay bypass fixed in TYPO3 4.3.12, 4.4.9 and 4.5.4 (CVE-2011-4628). TYPO3 waits 5 seconds before answering a failed backend login to slow down password guessing, but affected versions only apply this delay when the request carries the login button field. On a page that shows the TYPO3 backend login form, the feed sends two failed logins for a random account: one without the login button field, one with it. The host is reported when the first is answered immediately and the second only after the 5 second delay, which shows that the brute-force protection can be skipped. Fixed versions delay both attempts and are not reported. The versions affected by this flaw are also affected by the other issues fixed in the same releases (cross-site scripting, information disclosure, database information extraction and file deletion), which are listed with the finding.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/typo3/index.php - Parses / computes the next value with a Rhai script
- HTTP(S) request
POST {{dir}}/typo3/index.phpwith a crafted body - HTTP(S) request
POST {{dir}}/typo3/index.phpwith a crafted body - Checks
slow.bodyforname="login_status"→ finding QoD 75: TYPO3 backend login delay bypass (TYPO3-CORE-SA-2011-001)
References:
- https://typo3.org/security/advisory/typo3-core-sa-2011-001
- https://nvd.nist.gov/vuln/detail/CVE-2011-4628
- https://nvd.nist.gov/vuln/detail/CVE-2011-4626
- https://nvd.nist.gov/vuln/detail/CVE-2011-4902
- https://github.com/TYPO3/typo3/blob/TYPO3_4-5-3/typo3/index.php
- https://github.com/TYPO3/typo3/blob/TYPO3_4-5-4/typo3/index.php
Feed source — tests/vulnerabilities/typo3/typo3-core-sa-2011-001.yaml
# TYPO3 backend login — failed-login delay bypass (TYPO3-CORE-SA-2011-001,
# CVE-2011-4628) and the other flaws fixed in the same releases
# (CVE-2011-4626/4627/4629/4630/4631/4632/4901/4902/4903).
#
# Ported from OpenVAS/Greenbone NVT `2014/gb_typo3_mult_vuln_typo3-core-sa-2011-001.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.804210, GPL-2.0-only). The NASL posts a login with
# a random password to /typo3/index.php and reports any `HTTP 200` reply that
# carries `Expires: 0` — a header every TYPO3 backend page sends, fixed or not.
#
# What the advisory fixed ("Authentication Delay Bypass", NVD: "bypass
# authentication mechanisms in the backend through a crafted request"), from
# the TYPO3_4-5-3 → TYPO3_4-5-4 diff of typo3/index.php, SC_index::checkRedirect():
# before: } elseif (!$BE_USER->user['uid'] && $this->commandLI) {
# sleep(5); // Wrong password, wait for 5 seconds
# after: } elseif (!$BE_USER->user['uid'] && $this->isLoginInProgress()) {
# isLoginInProgress() = !(empty(username) && empty(commandLI))
# The login itself is triggered by `login_status=login` (t3lib_userauth), not by
# commandLI (the value of the form's submit button). Before the fix, a failed
# login that simply omits commandLI is answered at once, so the 5 s brute-force
# delay is bypassed; after it, any failed login carrying a username waits 5 s.
#
# Detection (benign behavioural proof, QoD 75): on a page that renders the
# TYPO3 backend login form, post a login for a random user and password
# 1. without commandLI -> must answer in < 3 s with the login form again;
# 2. with commandLI -> must answer in [4.5 s, 12 s) with the login form,
# at least 3 s slower than 1.
# Fixed releases delay 1 too (it carries a username), so 2 is not even sent.
# A server that delays every login POST (proxy rate limiting, tarpit) is slow
# on 1, and one that never delays is fast on 2: neither is reported. Every
# release with the commandLI-only condition (4.0 … 4.5.3) shows the bypass;
# the other nine CVEs are fixed in the same 4.3.12 / 4.4.9 / 4.5.4 releases,
# so they are reported with it. Only a failed login with a random account is
# sent: no account is guessed or locked.
# Both logins carry a same-host Referer: t3lib_userauth::checkAuthentication()
# aborts a login whose Referer host differs from the request host (default
# doNotCheckReferer = 0) before index.php ever reaches the delay.
# `duration_ms` covers the full response (#1924), headers and body.
uid: 9846d286-ad42-471a-9bcf-a9b2c6b4794a
name: "TYPO3 Backend Login Delay Bypass and Multiple Vulnerabilities (TYPO3-CORE-SA-2011-001)"
description: |
Tests the TYPO3 backend login (/typo3/index.php, also under /cms) for the
authentication delay bypass fixed in TYPO3 4.3.12, 4.4.9 and 4.5.4
(CVE-2011-4628). TYPO3 waits 5 seconds before answering a failed backend
login to slow down password guessing, but affected versions only apply this
delay when the request carries the login button field. On a page that shows
the TYPO3 backend login form, the feed sends two failed logins for a random
account: one without the login button field, one with it. The host is
reported when the first is answered immediately and the second only after
the 5 second delay, which shows that the brute-force protection can be
skipped. Fixed versions delay both attempts and are not reported. The
versions affected by this flaw are also affected by the other issues fixed
in the same releases (cross-site scripting, information disclosure,
database information extraction and file deletion), which are listed with
the finding.
cves: [CVE-2011-4626, CVE-2011-4627, CVE-2011-4628, CVE-2011-4629, CVE-2011-4630, CVE-2011-4631, CVE-2011-4632, CVE-2011-4901, CVE-2011-4902, CVE-2011-4903]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.30
tags: [typo3, cms, php, backend, brute-force, login-delay, auth-bypass]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://typo3.org/security/advisory/typo3-core-sa-2011-001"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4628"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4626"
- "https://nvd.nist.gov/vuln/detail/CVE-2011-4902"
- "https://github.com/TYPO3/typo3/blob/TYPO3_4-5-3/typo3/index.php"
- "https://github.com/TYPO3/typo3/blob/TYPO3_4-5-4/typo3/index.php"
# OpenVAS/Greenbone NASL 2014/gb_typo3_mult_vuln_typo3-core-sa-2011-001.nasl (GPL-2.0-only)
steps:
# Random account shared by both logins: it never exists, so both fail.
- id: gen-account
action: script
code: |
#{ user: "noctis" + rand_hex(6), ident: rand_hex(16), challenge: rand_hex(16) }
store_as: acct
# ── Loop group: every following step runs once per install dir; each pass
# resets what it reads, so nothing is left over from the previous dir.
- id: init-page
action: set_var
var_name: page
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/cms"]
- id: init-fast
action: set_var
var_name: fast
var_value: {status: 0, body: "", duration_ms: 0}
- id: init-slow
action: set_var
var_name: slow
var_value: {status: 0, body: "", duration_ms: 0}
- id: login-page
action: http_request
method: GET
path: "{{dir}}/typo3/index.php"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
store_as: page
# Product gate: the TYPO3 backend login form (hidden login_status field).
- id: typo3-gate
action: script
code: |
page.status == 200 && type_of(page.body) == "string"
&& page.body.contains("name=\"login_status\"")
&& page.body.contains("TYPO3")
store_as: is_t3
# 1. Failed login without the commandLI submit field.
- id: login-no-button
action: http_request
method: POST
path: "{{dir}}/typo3/index.php"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
Referer: "{{scheme}}://{{target_host}}:{{port}}{{dir}}/typo3/index.php"
body: "login_status=login&username={{acct.user}}&p_field=&userident={{acct.ident}}&challenge={{acct.challenge}}&redirect_url=alt_main.php&loginRefresh=&interface=backend"
condition: "is_t3"
store_as: fast
# 2. Same failed login with commandLI: affected versions apply the delay here.
- id: login-with-button
action: http_request
method: POST
path: "{{dir}}/typo3/index.php"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
Referer: "{{scheme}}://{{target_host}}:{{port}}{{dir}}/typo3/index.php"
body: "login_status=login&username={{acct.user}}&p_field=&commandLI=Log+In&userident={{acct.ident}}&challenge={{acct.challenge}}&redirect_url=alt_main.php&loginRefresh=&interface=backend"
condition: "is_t3 && fast.status == 200 && fast.duration_ms < 3000"
store_as: slow
- id: confirm-delay-bypass
action: match
source: slow.body
pattern: "name=\"login_status\""
condition: >-
is_t3 && fast.status == 200 && fast.duration_ms < 3000
&& fast.body.contains("name=\"login_status\"")
&& slow.status == 200 && slow.duration_ms >= 4500 && slow.duration_ms < 12000
&& slow.duration_ms - fast.duration_ms >= 3000
on_match:
finding:
title: "TYPO3 backend login delay bypass (TYPO3-CORE-SA-2011-001)"
confidence_delta: 0.55
qod: 75
evidence: "TYPO3 backend login at {{dir}}/typo3/index.php: a failed login without the commandLI field was answered in {{fast.duration_ms}} ms, the same failed login with commandLI in {{slow.duration_ms}} ms (5 s failed-login delay skipped; fixed in 4.3.12 / 4.4.9 / 4.5.4)"
stop: trueTYPO3 misc/phpcheck Debug Script Information Disclosure
| CVE | CVE-2005-4875 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | exposure — Exposure |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/typo3/CVE-2005-4875.yaml |
Checks whether the TYPO3 debug script misc/phpcheck/index.php, shipped with TYPO3 3.8.0 and earlier, can be run by anyone. When called with a query string the script prints the server's environment and path variables (document root, script file names, host names) followed by the full PHP configuration (phpinfo()), which helps an attacker prepare further attacks. The feed requests the script under the site root, /typo3_src, /cms and /cms/typo3_src with a random query value, and reports the host when the reply shows the TYPO3 environment table (TYPO3_HOST_ONLY, SCRIPT_FILENAME) with the random value echoed back and the phpinfo() page. A saved copy of the page, a missing script, or the access-denied message of later TYPO3 versions is not reported. No page content is copied into the finding.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/misc/phpcheck/index.php?arg1,arg2,arg3&p1={{mk}} - Parses / computes the next value with a Rhai script
- Checks
seenfor^phpcheck-executed$→ finding QoD 75: TYPO3 misc/phpcheck debug script discloses environment and phpinfo()
References:
- https://nvd.nist.gov/vuln/detail/CVE-2005-4875
- http://typo3.org/teams/security/security-bulletins/typo3-20050725-1/
- http://bugs.typo3.org/view.php?id=1250
- https://github.com/TYPO3/typo3/blob/TYPO3_3-8-0/misc/phpcheck/incfile.php
- https://github.com/TYPO3/typo3/blob/TYPO3_4-0-0/misc/phpcheck/incfile.php
Feed source — tests/vulnerabilities/typo3/CVE-2005-4875.yaml
# TYPO3 <= 3.8.0 misc/phpcheck debug script — environment / phpinfo() disclosure
# (CVE-2005-4875, TYPO3 bug 1250, security bulletin TYPO3-20050725-1).
#
# Ported from OpenVAS/Greenbone NVT `2014/gb_typo3_debugscript_info_disclosure_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.803980, GPL-2.0-only). The NASL requests
# <dir>/misc/phpcheck/index.php?arg1,arg2,arg3&p1=parameter1&p2[key]=value
# and reports a reply holding `TYPO3_HOST_ONLY`, `SCRIPT_FILENAME` and
# `<title>phpinfo()</title>`.
#
# Upstream source (raw.githubusercontent.com/TYPO3/typo3/TYPO3_3-8-0/misc/phpcheck/):
# index.php includes incfile.php, which — on any GET parameter or Referer —
# prints the t3lib_div::getIndpEnv() table (TYPO3_HOST_ONLY, QUERY_STRING,
# SCRIPT_FILENAME, TYPO3_DOCUMENT_ROOT …), the raw getenv()/$_SERVER values and
# then calls phpinfo(). From TYPO3 4.0 the script starts with
# if (substr(REMOTE_ADDR,0,7) != '192.168' && REMOTE_ADDR != '127.0.0.1') die(…)
# (bug 1250); 3.8.1 dropped misc/ from the source tree.
#
# Differences from the NASL (stronger proof, fewer misses):
# - the query carries a random value that must come back in the page: only
# the script actually running answers it (a saved copy of the page, which
# the script itself asks users to make and mail, is not reported);
# - besides the site root, the script is looked for under /typo3_src/ (the
# source-package symlink of the "dummy" site layout) and under /cms.
# The reply holds the server's environment: nothing of it is copied into the
# finding (the match runs on a fixed verdict string).
uid: aacbc40d-0234-4104-bf12-b0723b5c02fd
name: "TYPO3 misc/phpcheck Debug Script Information Disclosure"
description: |
Checks whether the TYPO3 debug script misc/phpcheck/index.php, shipped with
TYPO3 3.8.0 and earlier, can be run by anyone. When called with a query
string the script prints the server's environment and path variables
(document root, script file names, host names) followed by the full PHP
configuration (phpinfo()), which helps an attacker prepare further attacks.
The feed requests the script under the site root, /typo3_src, /cms and
/cms/typo3_src with a random query value, and reports the host when the reply shows the TYPO3
environment table (TYPO3_HOST_ONLY, SCRIPT_FILENAME) with the random value
echoed back and the phpinfo() page. A saved copy of the page, a missing
script, or the access-denied message of later TYPO3 versions is not
reported. No page content is copied into the finding.
category: exposure
cves: [CVE-2005-4875]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [typo3, cms, php, phpinfo, debug-script, information-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2005-4875"
- "http://typo3.org/teams/security/security-bulletins/typo3-20050725-1/"
- "http://bugs.typo3.org/view.php?id=1250"
- "https://github.com/TYPO3/typo3/blob/TYPO3_3-8-0/misc/phpcheck/incfile.php"
- "https://github.com/TYPO3/typo3/blob/TYPO3_4-0-0/misc/phpcheck/incfile.php"
# OpenVAS/Greenbone NASL 2014/gb_typo3_debugscript_info_disclosure_vuln.nasl (GPL-2.0-only)
steps:
# Random query value: only the running script echoes it (QUERY_STRING row).
- id: gen-marker
action: script
code: |
"nx" + rand_hex(10)
store_as: mk
# ── Loop group: the following steps run once per install dir; each pass
# resets what it reads, so nothing is left over from the previous dir.
- id: init-probe
action: set_var
var_name: probe
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/typo3_src", "/cms", "/cms/typo3_src"]
- id: phpcheck
action: http_request
method: GET
path: "{{dir}}/misc/phpcheck/index.php?arg1,arg2,arg3&p1={{mk}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: probe
# Verdict on a fixed string: the page (server environment) never reaches
# the finding.
- id: verdict
action: script
code: |
let b = if type_of(probe.body) == "string" { probe.body } else { "" };
if probe.status == 200
&& b.contains("TYPO3_HOST_ONLY")
&& b.contains("SCRIPT_FILENAME")
&& b.contains(mk)
&& b.contains("phpinfo()</title>") {
"phpcheck-executed"
} else {
""
}
store_as: seen
- id: report
action: match
source: seen
pattern: "^phpcheck-executed$"
on_match:
finding:
title: "TYPO3 misc/phpcheck debug script discloses environment and phpinfo()"
confidence_delta: 0.50
qod: 75
evidence: "GET {{dir}}/misc/phpcheck/index.php?arg1,arg2,arg3&p1=<random> returned the TYPO3 getIndpEnv() table (TYPO3_HOST_ONLY, SCRIPT_FILENAME) with the random query value echoed back, followed by phpinfo() output"
remediation: "Upgrade TYPO3 (3.8.1 removed the misc/ directory) and delete misc/phpcheck/ from the web server, or deny web access to it."
stop: true