Skip to content

ServerApplication::registerService() unquoted path security vulnerability #3193

@rtoelhoej

Description

@rtoelhoej

The ServerApplication::registerService() method in poco\Util\src\ServerApplication.cpp doesn't apply quotes to the service "path"

Please see the additional reference, to get a better understanding on how this should be fixed or feel free to contact me for any questions.

https://www.commonexploits.com/unquoted-service-paths/
https://trustfoundry.net/practical-guide-to-exploiting-the-unquoted-service-path-vulnerability-in-windows/

I would suggest that you change

std::string path = config().getString("application.path");

to

std::string path = Poco::format("\"%s\"", config().getString("application.path"));

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions