Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FISH-9112 : setting local Name and Port for /managment/domain URI #6889

Conversation

luiseufrasio
Copy link
Contributor

@luiseufrasio luiseufrasio commented Aug 14, 2024

Description

It is possible to trick the Payara Server’s management REST interface by “injecting” a malicious URL via the Host header of a sample request to let the HTML page that is generated by the REST interface when the /management/domain endpoint is targeted.

Important Info

Blockers

None

Testing

New tests

None

Testing Performed

Steps:

  1. run Payara Server
  2. on Powershell run:

Invoke-RestMethod -Method Get -Uri http://local:4848/management/domain
-Headers @{
'Accept' = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8'
'Accept-Encoding' = 'gzip, deflate, br'
'Accept-Language' = 'en-US,en;q=0.5'
'Host' = 'google.com'
} > result.html

  1. Open file result.html
  2. Check that google.com is not in the URLs

Testing Environment

Zulu JDK 11.0.11 Windows 11 with Maven 3.8.4

Documentation

None

Notes for Reviewers

Copy link
Member

@Pandrex247 Pandrex247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A suggestion for improvement, but I've tested this on a local machine and from a local machine calling a VM (to simulate a remote request) and it appears to resolve the issue.

@luiseufrasio luiseufrasio merged commit 133d648 into payara:main Aug 16, 2024
1 check passed
Pandrex247 pushed a commit to Pandrex247/Payara that referenced this pull request Sep 16, 2024
…redirection-host-in-header

FISH-9112 : setting local Name and Port for /managment/domain URI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants