-
Notifications
You must be signed in to change notification settings - Fork 21
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
JENKINS-54273: RAW HTML is shown in maven deployment links since 2.138.2 #5
base: master
Are you sure you want to change the base?
Conversation
I recommend a detailed security review before merging this. A similar PR (re-)introduced a security vulnerability in another plugin, as the input was not actually safe. |
In this plugin the html passed to j:out is built inside the plugin itself : |
Please think about the data flow here. The Build script that works on any Linux/Unix:
|
ddc860c
to
3e44fe1
Compare
@daniel-beck added a java.net.URL parsing, if it fails, url will be escaped |
To bypass the protection in 3e44fe1:
Unfortunately I'm out of time here, so will not be able to test further attempts to fix this. FWIW the approach in the plugin appears to be flawed and too cumbersome to make work, it should instead just add the links from the raw data in Jelly, rather than to insert a blob of questionable HTML. |
Agree with your point of view, I did not choose this way at first glance to avoid too many changes. |
3e44fe1
to
5f5ffe5
Compare
PR reworked as suggested by @daniel-beck , his last attack is now harmless |
${it.latestDeployments.text} | ||
<ul> | ||
<j:forEach items="${it.latestDeployments.deployments}" var="deployment"> | ||
<li><a href="${deployment.url}">${deployment.name}</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not disallow URLs with javascript:
scheme, so I expect there's still an XSS vulnerability here.
No description provided.