Hash: SHA1

                         AUSCERT Security Bulletin

                   Two vulnerabilities in Ruby on Rails
                             7 September 2009


        AusCERT Security Bulletin Summary

Product:              Ruby on Rails
Operating System:     UNIX variants (UNIX, Linux, OSX)
Impact/Access:        Cross-site Scripting           -- Remote/Unauthenticated
                      Provide Misleading Information -- Remote/Unauthenticated
Resolution:           Patch/Upgrade
CVE Names:            CVE-2009-3009  
Member content until: Wednesday, October  7 2009


        Two vulnerabilities have been discovered in Ruby on Rails which can
        cause Cross Site Scripting (XSS) and possible digest forging.


        The vendor has provided the following information regarding the
        vulnerabilities that have been corrected in versions 2.3.4 and 2.2.3:
        "There is a vulnerability in the escaping code for the form helpers in
        Ruby on Rails. Attackers who can inject deliberately malformed unicode
        strings into the form helpers can defeat the escaping checks and inject
        arbitrary HTML. Due to the way that most databases either dont accept
        or actively cleanse malformed unicode strings this vulnerability is
        most likely to be exploited by non-persistent attacks however
        persistent attacks may still be possible in some configurations." [1]
        "There is a weakness in the code Ruby on Rails uses to verify message
        digests in the cookie store. Because it uses a non-constant time
        algorithm to verify the signatures an attacker may be able to determine
        when a forged signature is partially correct. By repeating this process
        they may be able to successfully forge a digest. Due to issues like
        network latency, non-deterministic GC runs and other issues it is
        unlikely that this attack could be exploited in the wild within a
        reasonable timeframe. However users should still upgrade as soon as
        possible to remove the weakness" [2]


        Version 2.3.4 and 2.2.3 which correct these issues have been made
        available on the vendors website. [1][2]


        [1] XSS Vulnerability in Ruby on Rails

        [2] Timing Weakness in Ruby on Rails

AusCERT has made every effort to ensure that the information contained
in this document is accurate.  However, the decision to use the information
described is the responsibility of each user or organisation. The decision to
follow or act on information or advice contained in this security bulletin is
the responsibility of each user or organisation, and should be considered in
accordance with your organisation's site policies and procedures. AusCERT
takes no responsibility for consequences which may arise from following or
acting on information or advice contained in this security bulletin.

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:


Australian Computer Emergency Response Team
The University of Queensland
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours 
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
Comment: http://www.auscert.org.au/render.html?it=1967