fuge / cms Goto Github PK
View Code? Open in Web Editor NEWa java cms project use Spring, Spring MVC, Hibernate and Freemarker.
a java cms project use Spring, Spring MVC, Hibernate and Freemarker.
java.lang.RuntimeException: no site record in database!
foo.cms.web.FrontContextInterceptor.preHandle(FrontContextInterceptor.java:38)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:914)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
foo.common.web.ProcessTimeFilter.doFilter(ProcessTimeFilter.java:38)
Open redirection vulnerabilities arise when an application incorporates user-controllable data into the target of a redirection in an unsafe way. An attacker can construct a URL within the application that causes a redirection to an arbitrary external domain. This behavior can be leveraged to facilitate phishing attacks against users of the application. The ability to use an authentic application URL, targeting the correct domain and with a valid SSL certificate (if SSL is used), lends credibility to the phishing attack because many users, even if they verify these features, will not notice the subsequent redirection to a different domain.
The vulnerability exists in the file https://github.com/fuge/cms/blob/master/src/foo/cms/action/member/RegisterAct.java
where application is taking the nextUrl parameter as a user input and passing it without any validation. in next lines this nextUrl paramter is being used for redirection.
As mentioned above the file https://github.com/fuge/cms/blob/master/src/foo/cms/action/member/RegisterAct.java
contains the following code:
@RequestMapping(value = "/register.jspx", method = RequestMethod.POST)
public String submit(String username, String email, String password,
CmsUserExt userExt, String captcha, String nextUrl,
HttpServletRequest request, HttpServletResponse response,
ModelMap model) throws IOException {
This code takes in nextUrl as user input and passing it then this parameter is directly being used in line 110
response.sendRedirect(nextUrl);
/register.jspx
endpoint.Open redirection vulnerabilities arise when an application incorporates user-controllable data into the target of a redirection in an unsafe way. An attacker can construct a URL within the application that causes a redirection to an arbitrary external domain. This behavior can be leveraged to facilitate phishing attacks against users of the application. The ability to use an authentic application URL, targeting the correct domain and with a valid SSL certificate (if SSL is used), lends credibility to the phishing attack because many users, even if they verify these features, will not notice the subsequent redirection to a different domain.
The vulnerability exists in the file https://github.com/fuge/cms/blob/master/src/foo/core/action/front/ProcessAct.java
where application is taking RETURN_URL parameter as a user input and passing it without any validation. in next lines this returnUrl paramter is being used for redirection.
As mentioned above the file https://github.com/fuge/cms/blob/master/src/foo/core/action/front/ProcessAct.java contains the following code:
@RequestMapping(value = "/process.jspx", method = RequestMethod.GET)
public String process(HttpServletRequest request,
HttpServletResponse response) {
String returnUrl = RequestUtils.getQueryParam(request,
LoginAct.RETURN_URL);
String authId = RequestUtils.getQueryParam(request, AUTH_KEY);
Authentication auth = authMng.retrieve(authId);
if (auth != null) {
authMng.storeAuthIdToSession(session, request, response, auth
.getId());
} else {
log.warn("Authentication id not found: {}", authId);
}
return "redirect:" + returnUrl;
}
/process.jspx
endpoint.hi, some code presented in the project is vulnerable to SQL injection. I am mentioning the vulnerable snippet below.
https://github.com/fuge/cms/blame/91f76341163b20d0db90406396ac86129b5d55d4/src/foo/cms/Install.java#L61:L73
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.