GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java: queries about user-controlled URLs should be sanitized by enforcing a prefix · Issue #4530 · github/codeql

Java: queries about user-controlled URLs should be sanitized by enforcing a prefix #4530

New issue
Copy link
New issue
Copy link
Open
Open
Java: queries about user-controlled URLs should be sanitized by enforcing a prefix#4530
Copy link
Labels
JavaquestionFurther information is requested

Description

@pwntester
pwntester
opened on Oct 21, 2020
Issue body actions

This comes from a discussion with @smowton over here.

Certain categories such as Open Redirect, SSRF and Android WebView URL injection will benefit from a sanitizer which would clean the taint in case the dataflow goes through a string prefix operation (concatenation, format strings, string buffers, string writer ...). Since not controlling the begging of the URL will severely decrease the exploitability of these issues.

Reacted by love ny and Jorge

Activity

  1. pwntester
    added
    questionFurther information is requested
    on Oct 21, 2020
  2. smowton
    changed the title [-]General issue[/-] [+]Java: queries about user-controlled URLs should be sanitized by enforcing a prefix[/+] on Oct 21, 2020
  3. smowton commented on Oct 21, 2020

    @smowton
    smowton
    on Oct 21, 2020
    Contributor
    More actions

    Added a descriptive title

  4. smowton commented on Oct 21, 2020

    @smowton
    smowton
    on Oct 21, 2020
    Contributor
    More actions

    Looks like as well as the XSS query's clause relating to user-controlled fetches, this should also apply to other URL-based queries like java/unvalidated-url-redirection. Go's version of the same query already filters in this way here: https://github.com/github/codeql-go/blob/main/ql/src/semmle/go/security/UrlConcatenation.qll#L94

  5. aschackmull
    added
    Java
    on Nov 13, 2020
  6. github-actions commented on Apr 16, 2021

    @github-actions
    github-actionsBot
    on Apr 16, 2021
    Contributor
    More actions

    This issue is stale because it has been open 14 days with no activity. Comment or remove the stale label in order to avoid having this issue closed in 7 days.

  7. github-actions
    added
    Stale
    on Apr 16, 2021
  8. neverlovelynn commented on Apr 16, 2021

    @neverlovelynn
    neverlovelynn
    on Apr 16, 2021
    More actions

    I encountered the same problem when using codeql. Is this problem solved now?

  9. aschackmull
    removed
    Stale
    on Apr 16, 2021
  10. smowton commented on Apr 16, 2021

    @smowton
    smowton
    on Apr 16, 2021
    Contributor
    More actions

    Hah, I'd forgotten about this. I ported this from Go when promoting the Java SSRF query from experimental (#5587). That should be generalised to other queries concerned with a user-controlled URL.

  11. ZH3FENG commented on May 20, 2021

    @ZH3FENG
    ZH3FENG
    on May 20, 2021
    More actions

    Same as javascript, so many false-positive reports, particularly SSRF.
    Is there any filter in js?

  12. pwntester commented on Feb 23, 2022

    @pwntester
    pwntester
    on Feb 23, 2022
    ContributorAuthor
    More actions

    Another category that would benefit from this is JNDI injections where attackers need to control the beginning of the url /cc @atorralba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.