what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

modsurvey0321.txt

modsurvey0321.txt
Posted Mar 22, 2004
Authored by Niklas Deutschman

The mod_survey module versions 3.0.16-pre1 and below for Apache are susceptible to a script injection attack.

tags | advisory
SHA-256 | 18880aeaa0e51e9fe61f172cb98d6871fcde873b32f602869732da1c35fa91e9

modsurvey0321.txt

Change Mirror Download
This was published on the Mod_Survey mailing list a few minutes ago.


#########################################################
Mod_Survey Security Advisory 2004-03-21, Script injection
#########################################################


ABOUT MOD_SURVEY
----------------
Mod_Survey is an Apache module which displays and handles questionnaires
written in a special XML-based markup language. Mod_Survey is primarily
targeted towards Linux/Unix, but is also possible to run in Windows.


SUMMARY
-------
In all versions older than a 2004-03-21, it is possible for a remote
evil person to submit script code (such as JavaScript) along with his
normal answers. This could, for example, be exploitable to get access
to the password cookie used by the administrator of the survey, and
thereby read access to the submitted data.


ERROR CATEGORY
--------------
The error falls into the classes "Input Validation Error" and
"Script Injecion". It is possible to exploit remotely.


VULNERABLE
----------
In stable (3.0.x) branch:

All versions up to and including 3.0.16-pre1

In development (3.2.x) branch:

All versions up to and including 3.2.0-pre3

Not vulnerable:

3.0.16-pre2
3.2.0-pre4


SOLUTION
--------
Users of the stable branch are encouraged to upgrade to 3.0.16-pre2.
Users of the development branch are encourage to upgrade to 3.2.0-pre4
or to the current CVS version.


LONGER DISCUSSION
-----------------
Mod_Survey accepts arbitrary text-field type answers to be submitted by
a respondent. As the data backend usually does not care about what is
actually contained in these answers, very few illegal characters have
been filtered out from being saved. This is in itself not a major
problem.

However, when the administrator of the survey wants to download the
submitted data, he gets to choose between several different formats. One
of these is to download it as a HTML table.

Previously, the data was pasted straigh into the HTML output without any
filtering or escaping. To illustrate the problem, let's assume that the
respondent answered that his name was:

<script>alert('Hello there')</script>

..then the survey administrator would see an annoyingly displayed message
box every time he looked at the data through his browser.

The same approach would be valid for other export formats, such as the
SQL export and the XML export.

It has also been pointed out that a similar problem occurs in error
messages about malformed query strings in Mod_Survey. The conceivable
impact of this is limited, but the problem has been fixed as a part of
this security update. Further, steps have been taken to add an extra
layer of protection around the data backend.

The problem has been addressed differently in the two major branches of
Mod_Survey. In the stable branch, illegal characters are now blocked
altogether. It will thus not be possible to submit characters like <, >,
$ and '. Since earlier other characters such as ;, " and & have been
blocked. System administrators should be aware of this before upgrading
to the new version, as also legitimate uses of these characters are
blocked. This could cause some irritation amongst respondents. One
workaround if this becomes a problem is to set _SURVEY_PROTESTILLEGAL to
0, which will silently replace illegal characters with pipe signs rather
than whining at the respondent.

In the development branch, the solution has been to filter the output
rather than the input. Thus, each data export now keeps track of which
characters to filter out or escape. Thus, for example, the HTML export
will silently replace all "<" with "<".


EXPLOIT
-------
A proof of concept of the script injection problem has been written and
published by Niklas Deutschmann on the Mod_Survey mailing list. As this
involves no complicated coding and since anyone with some insight into
JavaScript immediately will understand how to exploit the flaw, there is
no reason to republish this exploit here. Please refer to the Mod_Survey
mailing list if you are interested.


IMPACT
------
Most surveys will be vulnerable to this. Surveys that only contain
numerical input fields will not be affected. Nor will this be a problem
in closed-sample surveys where the respondents are known and trusted.

In surveys where the administration part has been knowingly left open
so that respondents can view answers anyway, this will merely be a
minor annoyance.

All in all the impact must be characterized as severe.


CREDITS
-------
The problem was first discovered and discussed by Niklas Deutschmann,
who also wrote a proof of concept. BugAnt submitted the basic code for
solving the problem in the 3.2.x branch.

// Joel
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    0 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    0 Files
  • 10
    May 10th
    0 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close