Skip to content
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
This repository was archived by the owner on Jan 30, 2019. It is now read-only.

[sec] Attacker could load own helpset #36

Open

Description

@glassfishrobot

javax.help.tagext.ValidateTag allows to provide the url to the hsName by a reqeust parameter, if no hsName is provided in the code an attacker could provide a link to some helpSet he controls and load it into any website.
The request parameter helpset has to be validated before using it.

Activity

  1. glassfishrobot commented on Jan 27, 2012

    @glassfishrobot
    ContributorAuthor

    Reported by hme

  2. glassfishrobot commented on Jan 27, 2012

    @glassfishrobot
    ContributorAuthor

    hme said:
    Sorry this is wrong, because of an other bug or strange code it is not possible to provide a helpset with an URL other than the URL from the request. An attacker has to change the request URL to something he controls.

    In createHelpSet() in javax.help.tagext.ValidateTag at first there is this check:

    if (!hsName.startsWith("/")) {
    	    hsName = "/" + hsName;
    	}
    

    This adds an "/" at the beginning if there is non, so this if is never true:

    if (hsName.startsWith("http")) {
    		url = new URL (hsName);
    	    } else {
    		url = new URL(request.getScheme(),
    			      request.getServerName(),
    			      request.getServerPort(),
    			      hsName);
    	    }
    
  3. glassfishrobot commented on Apr 26, 2017

    @glassfishrobot
    ContributorAuthor

    This issue was imported from java.net JIRA JAVAHELP-36

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions