Csnews — 1 vulnerability check
noctis ships 1 vulnerability check for Csnews, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
CGIScript.net csNews.cgi Unauthenticated Advanced Settings Header/Footer File Read
| CVE | CVE-2002-0923 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/csnews/CVE-2002-0923.yaml |
Detects CGIScript.net csNews and csNews Pro installations whose csNews.cgi serves the administrator's "Advanced Settings" page to anyone (CVE-2002-0923). That page sets the header and footer files of the news pages through its pheader and pfooter fields and accepts any file name, so an unauthenticated visitor can make the script print arbitrary files, such as setup.cgi with the administrator's credentials. The feed requests csNews.cgi?database=default%2edb&command=showadv&mpage=manager (csNews.cgi and CSNews.cgi, under the web root, /cgi-bin, /scripts and a csNews/ sub-directory of each) without credentials and reports when the reply is the settings form itself, with form fields named both pheader and pfooter. The form is only read, never submitted: nothing is changed on the target.
How noctis detects it
- HTTP(S) request
GET {{script}}?database=default%2edb&command=showadv&mpage=manager - Checks
adv.bodyfor(?i)name\s*=\s*["']?pfooter\b→ finding QoD 75: csNews.cgi serves its Advanced Settings (header/footer file) form without authentication
References:
- https://nvd.nist.gov/vuln/detail/CVE-2002-0923
- https://seclists.org/bugtraq/2002/Jun/97
- http://www.securityfocus.com/bid/4994
Feed source — tests/vulnerabilities/csnews/CVE-2002-0923.yaml
# CGIScript.net csNews / csNews Pro csNews.cgi — Advanced Settings header/footer
# file read (CVE-2002-0923, BID 4994, Bugtraq 2002-06-11 "CGIscript.net -
# csNews.cgi - Multiple Vulnerabilities", ISS X-Force 9333)
#
# Credit: target locations adapted from Greenbone's `pre2008/csnews.nasl`
# (GPL-2.0-only), which only reports that <cgi dir>/csNews.cgi exists
# (http_is_cgi_installed_ka) under / and the CGI dirs.
#
# Advisory facts (no source code is public — commercial script):
# * "Advanced Settings", meant for the administrator, can be viewed, updated
# and saved by anonymous or regular users:
# CSNews.cgi?database=default%2edb&command=showadv&mpage=manager
# * its form fields pheader / pfooter name the files printed as the news
# page header and footer — any file (the advisory's example points them
# at setup.cgi, which holds the superuser name and password): arbitrary
# file read, then privilege gain with the leaked admin credentials.
#
# This feed requests the Advanced Settings page exactly as the advisory does,
# without credentials, and reports only when the reply is the settings form
# itself (input fields named pheader AND pfooter). It never submits the form:
# saving a header/footer would change the site's news pages, so the file read
# is not performed; the unauthenticated access to the form that sets it is the
# proof (QoD 75). A fixed or password-protected install answers with its login
# page, an absent script with 404.
#
# Better than the reference check: the reference reports any csNews.cgi that
# exists (fixed releases too); this feed needs the vulnerable form to be served
# to an anonymous client, and also looks in a csNews/ sub-directory and under
# the advisory's CSNews.cgi spelling.
uid: 1021bac4-748a-4e21-ad0c-54e905d703fc
name: "CGIScript.net csNews.cgi Unauthenticated Advanced Settings Header/Footer File Read (CVE-2002-0923)"
description: |
Detects CGIScript.net csNews and csNews Pro installations whose csNews.cgi
serves the administrator's "Advanced Settings" page to anyone
(CVE-2002-0923). That page sets the header and footer files of the news
pages through its pheader and pfooter fields and accepts any file name, so
an unauthenticated visitor can make the script print arbitrary files, such
as setup.cgi with the administrator's credentials. The feed requests
csNews.cgi?database=default%2edb&command=showadv&mpage=manager (csNews.cgi
and CSNews.cgi, under the web root, /cgi-bin, /scripts and a csNews/
sub-directory of each) without credentials and reports when the reply is the
settings form itself, with form fields named both pheader and pfooter. The
form is only read, never submitted: nothing is changed on the target.
cves: [CVE-2002-0923]
cvss: 7.5
severity: high
confidence_base: 0.30
category: file-read
tags: [csnews, cgiscript, cgi, perl, file-read, auth-bypass, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2002-0923"
- "https://seclists.org/bugtraq/2002/Jun/97"
- "http://www.securityfocus.com/bid/4994"
steps:
# ── Per location: this step and every following one ──
# Pre-initialised so a failed request leaves no undefined variable behind.
- id: init-adv
action: set_var
var_name: adv
var_value: {status: 0, body: ""}
loop:
over:
- "/cgi-bin/csNews.cgi"
- "/cgi-bin/CSNews.cgi"
- "/cgi-bin/csNews/csNews.cgi"
- "/csNews.cgi"
- "/CSNews.cgi"
- "/csNews/csNews.cgi"
- "/scripts/csNews.cgi"
- "/scripts/CSNews.cgi"
var: script
- id: show-advanced-settings
action: http_request
method: GET
port: "{{port}}"
path: "{{script}}?database=default%2edb&command=showadv&mpage=manager"
follow_redirects: false
tls_insecure: true
timeout_secs: 10
store_as: adv
- id: confirm-settings-form
action: match
source: adv.body
pattern: "(?i)name\\s*=\\s*[\"']?pfooter\\b"
case_insensitive: true
condition: "adv.status == 200 && type_of(adv.body) == \"string\" && ereg(\"(?i)<(?:input|textarea|select)[^>]*\\\\bname\\\\s*=\\\\s*[\\\"']?pheader\\\\b\", adv.body) && ereg(\"(?i)<(?:input|textarea|select)[^>]*\\\\bname\\\\s*=\\\\s*[\\\"']?pfooter\\\\b\", adv.body)"
on_match:
finding:
confidence_delta: 0.55
qod: 75
title: "csNews.cgi serves its Advanced Settings (header/footer file) form without authentication"
evidence: "GET {{script}}?database=default%2edb&command=showadv&mpage=manager without credentials returned HTTP 200 with the Advanced Settings form (input fields pheader and pfooter, which set the files printed as the news header and footer)"
remediation: "Remove csNews.cgi or upgrade to a vendor release that requires the administrator password for Advanced Settings; restrict access to the script to trusted users."
stop: true