OpenForum — 1 vulnerability check
noctis ships 1 vulnerability check for OpenForum, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
OpenForum profile.php Authentication Bypass
| CVE | CVE-2008-7066 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, tcp_connect, script, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/openforum/CVE-2008-7066.yaml |
OpenForum 0.66 Beta and earlier trusts a client-side "userid" cookie to know who is logged in. Anyone can therefore open the profile edit form of any account, including the administrator's, and submit it to change that account's password and take it over. Version 0.72 moved identification to a server-side session.
This check loads the forum's index page under the web root and the usual install paths, keeps its session cookie and the name of a member linked from the page (and "admin"), then requests that member's profile page twice: once as an anonymous visitor, as a control, and once with a forged "userid" cookie naming the member. The vulnerability is confirmed when only the forged-cookie request returns the member's profile edit form. Nothing is submitted and no account is changed. When the edit form cannot be reached, a forum footer reporting OpenForum 0.66 or earlier is reported with lower confidence.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET {{dir}}/index.php HTTP/1.0 - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/profile.php?user={{ctx.user}} - HTTP(S) request
GET {{dir}}/profile.php?user={{ctx.user}} - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/profile.php?user={{ctx.user2}} - HTTP(S) request
GET {{dir}}/profile.php?user={{ctx.user2}} - Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Checks
hitfor^/→ finding QoD 97: OpenForum profile.php Authentication Bypass (CVE-2008-7066) - Checks
fallbackforreports OpenForum→ finding QoD 70: OpenForum profile.php Authentication Bypass (CVE-2008-7066) — vulnerable version
References:
- https://nvd.nist.gov/vuln/detail/CVE-2008-7066
- https://www.exploit-db.com/exploits/7291
- https://sourceforge.net/projects/openforum/
Feed source — tests/vulnerabilities/openforum/CVE-2008-7066.yaml
# OpenForum (javalc6, openforum.sourceforge.net) 0.66 Beta and earlier —
# profile.php authentication bypass — CVE-2008-7066 (BID 32536, EDB-7291)
#
# Up to 0.66 Beta the forum identified the visitor from client-side cookies
# (`sessid` + `userid`) instead of a server-side session: profile.php shows the
# profile edit form (hidden update=1, e-mail, signature, password…) of
# ?user=<name> whenever the `userid` cookie equals <name>, and the POST of that
# form (update=1) rewrites the account, password included. The public PoC
# (CWH Underground, EDB-7291) takes the `sessid` cookie handed out by index.php,
# requests profile.php?user=admin with "Cookie: sessid=<sid>; userid=admin", reads
# the e-mail / signature fields back from that form, then POSTs update=1 with a
# new password. 0.68 moved login to PHP sessions and profile.php's changelog
# records "0.72 … Solved security issue http://www.securityfocus.com/bid/32536";
# from then on $userid comes from $_SESSION only, so a forged cookie is ignored.
# 0.66 Beta itself is no longer downloadable (SourceForge only keeps 0.78+);
# the request shape comes from the PoC and the form markup from 0.78's
# profile.php, whose edit form is the one the PoC parses ("email" value="…",
# "signature">…</textarea>).
#
# Detection (QoD 97), read-only — the PoC's GET only, never its POST:
# 1. GET <dir>/index.php (raw, to keep every Set-Cookie): OpenForum page, its
# sessid cookie, and a member name from a profile.php?user= link; "admin"
# (the PoC's account) is tried too when the linked name gives no form;
# 2. control: profile.php?user=<name> with the sessid cookie only — must not
# show the edit form (an anonymous visitor gets the public profile view);
# 3. probe: the same request with "userid=<name>" added — the edit form of
# <name> ("email" value=" + "signature"> textarea) proves the forum accepted
# the forged identity cookie. Nothing is submitted.
# Version fallback (QoD 70): when no dir produced the proof (e.g. no account
# named like a harvested/default name), a "Powered by OpenForum [Version] <= 0.66"
# footer (0.78 prints "OpenForum</a> Version 0.78 Beta Release: …").
#
# Better than the source NASL: the NASL only compares the version stored by the
# product detection (<= 0.66.Beta); this check proves the bypass on the live
# forum with a differential control, covers several install paths, and keeps the
# version only as a lower-confidence fallback.
#
# Source: OpenVAS/Greenbone NVT 2009/gb_openforum_auth_bypass_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.900927, GPL-2.0-only).
uid: 3d67e1e8-6235-4570-b268-34e2e841c140
name: "OpenForum profile.php Authentication Bypass (CVE-2008-7066)"
description: |
OpenForum 0.66 Beta and earlier trusts a client-side "userid" cookie to know
who is logged in. Anyone can therefore open the profile edit form of any
account, including the administrator's, and submit it to change that
account's password and take it over. Version 0.72 moved identification to a
server-side session.
This check loads the forum's index page under the web root and the usual
install paths, keeps its session cookie and the name of a member linked from
the page (and "admin"), then requests that member's profile page twice: once
as an anonymous visitor, as a control, and once with a forged "userid" cookie
naming the member. The vulnerability is confirmed when only the forged-cookie
request returns the member's profile edit form. Nothing is submitted and no
account is changed. When the edit form cannot be reached, a forum footer
reporting OpenForum 0.66 or earlier is reported with lower confidence.
cves: [CVE-2008-7066]
cvss: 7.5
severity: high
category: auth-bypass
confidence_base: 0.30
tags: [openforum, auth-bypass, cookie, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2008-7066"
- "https://www.exploit-db.com/exploits/7291"
- "https://sourceforge.net/projects/openforum/"
# OpenVAS/Greenbone NASL 2009/gb_openforum_auth_bypass_vuln.nasl (GPL-2.0-only)
steps:
- id: init-hit
action: set_var
var_name: hit
var_value: ""
- id: init-fallback
action: set_var
var_name: fallback
var_value: ""
# ── Per candidate install path (loop group) ───────────────────────────────
- id: init-idx
action: set_var
var_name: idx
var_value: {connected: false, banner: ""}
loop:
var: dir
over: ["", "/OpenForum", "/openforum", "/forum"]
- id: init-ctx
action: set_var
var_name: ctx
var_value: {ok: false}
- id: init-ctl
action: set_var
var_name: ctl
var_value: {status: 0, body: ""}
- id: init-prb
action: set_var
var_name: prb
var_value: {status: 0, body: ""}
- id: init-ctl2
action: set_var
var_name: ctl2
var_value: {status: 0, body: ""}
- id: init-prb2
action: set_var
var_name: prb2
var_value: {status: 0, body: ""}
- id: fetch-index
action: tcp_connect
port: "{{port}}"
send: "GET {{dir}}/index.php HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: Mozilla/5.0\r\nAccept: text/html\r\n\r\n"
condition: 'hit == ""'
store_as: idx
- id: parse-index
action: script
condition: 'hit == ""'
code: |
let raw = if type_of(idx.banner) == "string" { idx.banner } else { "" };
let st = eregmatch("^HTTP/[0-9.]+ ([0-9]{3})", raw);
let ok = st.len() > 1 && st[1] == "200" && egrep("openforum", raw, true) != "";
let sess = "";
let s = eregmatch("(?m)^set-cookie:[ \\t]*sessid=([^;\\r\\n]*)", raw, true);
if s.len() > 1 { sess = s[1]; }
let user = "admin";
let u = eregmatch("profile\\.php\\?user=([A-Za-z0-9_.-]{1,40})[\"&']", raw);
if u.len() > 1 { user = u[1]; }
let ver = "";
// footer: "Powered by <a …>OpenForum</a> Version 0.78 Beta Release: …"
let v = eregmatch("openforum(</a>)?[ \\t]*(version[ \\t]*)?v?(0\\.[0-9]+)", raw, true);
if v.len() > 3 && parse_float(v[3]) <= 0.66 { ver = v[3]; }
let base = if sess != "" { "sessid=" + sess } else { "noctis=" + rand_hex(6) };
// a harvested name may be a deleted poster: then also try "admin"
let user2 = if user != "admin" { "admin" } else { "" };
#{ ok: ok, user: user, user2: user2, ver: ver, c_ctl: base,
c_prb: base + "; userid=" + user, c_prb2: base + "; userid=" + user2 }
store_as: ctx
- id: control
action: http_request
method: GET
path: "{{dir}}/profile.php?user={{ctx.user}}"
port: "{{port}}"
headers:
Cookie: "{{ctx.c_ctl}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
condition: 'hit == "" && ctx.ok == true'
store_as: ctl
- id: probe
action: http_request
method: GET
path: "{{dir}}/profile.php?user={{ctx.user}}"
port: "{{port}}"
headers:
Cookie: "{{ctx.c_prb}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
condition: 'hit == "" && ctx.ok == true'
store_as: prb
- id: verdict
action: script
condition: 'hit == "" && ctx.ok == true'
code: |
let pb = if type_of(prb.body) == "string" { prb.body } else { "" };
let cb = if type_of(ctl.body) == "string" { ctl.body } else { "" };
// the edit form the public PoC parses: e-mail input + signature textarea
let form_p = pb.contains("\"email\" value=\"") && pb.contains("\"signature\">");
let form_c = cb.contains("\"email\" value=\"") || cb.contains("\"signature\">");
// control must have been answered by the forum (no failed request)
if prb.status == 200 && form_p && ctl.status >= 200 && ctl.status < 400 && !form_c {
(if dir == "" { "/" } else { dir }) + " (account " + ctx.user + ")"
} else { "" }
store_as: hit
- id: control-admin
action: http_request
method: GET
path: "{{dir}}/profile.php?user={{ctx.user2}}"
port: "{{port}}"
headers:
Cookie: "{{ctx.c_ctl}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
condition: 'hit == "" && ctx.ok == true && ctx.user2 != ""'
store_as: ctl2
- id: probe-admin
action: http_request
method: GET
path: "{{dir}}/profile.php?user={{ctx.user2}}"
port: "{{port}}"
headers:
Cookie: "{{ctx.c_prb2}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
condition: 'hit == "" && ctx.ok == true && ctx.user2 != ""'
store_as: prb2
- id: verdict-admin
action: script
condition: 'hit == "" && ctx.ok == true && ctx.user2 != ""'
code: |
let pb = if type_of(prb2.body) == "string" { prb2.body } else { "" };
let cb = if type_of(ctl2.body) == "string" { ctl2.body } else { "" };
// the edit form the public PoC parses: e-mail input + signature textarea
let form_p = pb.contains("\"email\" value=\"") && pb.contains("\"signature\">");
let form_c = cb.contains("\"email\" value=\"") || cb.contains("\"signature\">");
// control must have been answered by the forum (no failed request)
if prb2.status == 200 && form_p && ctl2.status >= 200 && ctl2.status < 400 && !form_c {
(if dir == "" { "/" } else { dir }) + " (account " + ctx.user2 + ")"
} else { "" }
store_as: hit
- id: keep-version
action: script
condition: 'ctx.ok == true'
code: |
if fallback == "" && ctx.ver != "" { (if dir == "" { "/" } else { dir }) + " reports OpenForum " + ctx.ver } else { fallback }
store_as: fallback
- id: report
action: match
source: hit
pattern: "^/"
on_match:
finding:
title: "OpenForum profile.php Authentication Bypass (CVE-2008-7066)"
description: "profile.php returned a member's profile edit form to a request carrying only a forged \"userid\" cookie naming that member, while the same request without that cookie did not: the forum trusts a client-side cookie as the logged-in identity, so anyone can submit that form (update=1) to change any account's password, including the administrator's."
remediation: "Upgrade OpenForum to 0.72 or later (login and identity moved to a server-side PHP session); OpenForum is no longer maintained, so consider replacing it. Until then, block profile.php from untrusted networks."
confidence_delta: 0.67
qod: 97
evidence: "install dir {{hit}}: GET profile.php?user=<account> with Cookie userid=<account> returned that account's profile edit form (\"email\" value=, \"signature\" textarea); the same request without the userid cookie did not"
stop: true
# ── Version fallback, only when no dir produced the proof ─────────────────
- id: fallback-once
action: set_var
var_name: once
var_value: true
loop:
var: pass
over: ["once"]
- id: report-version
action: match
source: fallback
pattern: "reports OpenForum"
condition: 'hit == ""'
on_match:
finding:
title: "OpenForum profile.php Authentication Bypass (CVE-2008-7066) — vulnerable version"
description: "The forum footer reports OpenForum 0.66 or earlier, which trusts a client-side \"userid\" cookie as the logged-in identity (profile edit form and password change of any account). The bypass itself could not be shown, e.g. because no account name was known."
remediation: "Upgrade OpenForum to 0.72 or later; OpenForum is no longer maintained, so consider replacing it."
confidence_delta: 0.40
qod: 70
evidence: "{{fallback}}"