Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save artem-smotrakov/8f9d666cc58ccff9dd50d42a3cc1d68d to your computer and use it in GitHub Desktop.

Select an option

Save artem-smotrakov/8f9d666cc58ccff9dd50d42a3cc1d68d to your computer and use it in GitHub Desktop.
An example of a vulnerable HTTP endpoint based on HttpInvokerServiceExporter (CVE-2016-1000027)
@Configuration
class Server {
@Bean(name = "/account")
HttpInvokerServiceExporter accountService() {
HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
exporter.setService(new AccountServiceImpl());
exporter.setServiceInterface(AccountService.class);
return exporter;
}
}
class AccountServiceImpl implements AccountService {
@Override
public String echo(String data) {
return data;
}
}
interface AccountService {
String echo(String data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment