Code Monkey home page Code Monkey logo

Comments (8)

ssddanbrown avatar ssddanbrown commented on July 29, 2024 1

I'm going to go ahead and close this off as I feel the goal here is to dismiss a warning in an automated scanner, rather to consider the context, risk and actual security implications.

If you believe there is an actual risk I'm happy to hear feedback/input but I'd need that explained with context, which in this case is for an XSRF token where we send XSRF tokens in HTML responses anyway.

from website.

D4thToMS avatar D4thToMS commented on July 29, 2024 1

Perfect ! That's easier I'll ask all vulnerability scanner to make an exception 🥇
Not only vulnerability scanner reports this issue, also OWAS ZAP, but they must be wrong of course.
ZAP Scanning Report.pdf

from website.

ssddanbrown avatar ssddanbrown commented on July 29, 2024

@ducarrozb Please confirm exactly what cookie you're referring to that you'd consider a security issue in this context.

from website.

ducarrozb avatar ducarrozb commented on July 29, 2024

@ssddanbrown

Screenshot 2024-04-09 at 14 12 53

from website.

ssddanbrown avatar ssddanbrown commented on July 29, 2024

@ducarrozb thanks for providing the detail.

I don't really see making the XSRF token HttpOnly adding any reasonable security benefit here since, following the scenario in the "Vulnerability Insight" section, the XSRF token could just be read from the DOM anyway.
While the XSRF token is session based, it is not the user session itself.

If you do forsee some security risk here feel free to explain it within the context of this application and specific use of cookie to help me understand any actual risk/concerns.

from website.

ducarrozb avatar ducarrozb commented on July 29, 2024

Hmm, not sure if hackers see that the same way than you:

As you can see in the report the cookie could lead to session hijacking attacks.
As told above, I tried to insert

<IfModule mod_headers.c>
    Header always edit Set-Cookie (.*) "$1; HttpOnly."
</IfModule>

in different files, but the problem persists. I wonder just in which file I have to add these lines, since this would be the solution of the problem

from website.

ssddanbrown avatar ssddanbrown commented on July 29, 2024

@ducarrozb None of those links indicate why the lack of HttpOnly for a XSRF token (which is already in the HTML) cookie would be an issue. I understand how HttpOnly can help security and where it's useful (like for sessions where it's already used) but otherwise I'm not sure why we need to make this change for the XSRF token outside of not throwing an alter in the specific automated scanner you use.

from website.

D4thToMS avatar D4thToMS commented on July 29, 2024

Hi,

I have the same problem here. When scaning for vulnerabilities the bookstack website comes up with "Set the 'HttpOnly' cookie attribute for any session cookie".
In the Apache config we set the VIrtualHost to force these secure cookies:

<VirtualHost bookstack.mydomain.tld:443>
    Header always edit Set-Cookie ^(.*)$ "$1;HttpOnly;Secure"
    ...
</VirtualHost>

Apache us up to date, the module mod_headers.so is loaded.

What can we do ?

Many thanks

from website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.