Skip to content

CWE-749: Exposed Dangerous Method or Function

BaseLikelihood of exploit: Low

The product provides an Applications Programming Interface (API) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted.

This weakness can lead to a wide variety of resultant weaknesses, depending on the behavior of the exposed method. It can apply to any number of technologies and approaches, such as ActiveX controls, Java functions, IOCTLs, and so on. The exposure can occur in a few different ways: The function/method was never intended to be exposed to outside actors. The function/method was only intended to be accessible to a limited set of actors, such as Internet-based access from a single web site.

Consequences

  • Integrity, Confidentiality, Availability, Access Control, Other: Gain Privileges or Assume Identity, Read Application Data, Modify Application Data, Execute Unauthorized Code or Commands, Other

How to prevent it

  • Architecture and Design: If you must expose a method, make sure to perform input validation on all arguments, limit access to authorized parties, and protect against all possible vulnerabilities.
  • Architecture and Design, Implementation: Identify all exposed functionality. Explicitly list all functionality that must be exposed to some user or set of users. Identify which functionality may be: accessible to all users restricted to a small set of privileged users prevented from being directly accessible at all Ensure that the implemented code follows these expectations. This includes setting the appropriate access modifiers where applicable (public, private, protected, etc.) or not marking ActiveX controls safe-for-scripting.

Recent advisories

  • GHSA-wf6j-gr27-g7ch — GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates
  • GHSA-7f3r-gwc9-2995 — view_component: Preview Route Can Dispatch Inherited Helper Methods
  • GHSA-grj5-jjm8-h35p — VM2 Sandbox Breakout Through __lookupGetter__
  • GHSA-j4p8-h8mh-rh8q — Self-hosted n8n has Legacy Code node that enables arbitrary file read/write
  • GHSA-3q2w-42mv-cph4 — filebrowser Allows Shell Commands to Spawn Other Commands
  • GHSA-m37h-8r48-2cxj — H2O Vulnerable to Execution of Arbitrary Files
  • GHSA-7qwv-cwgj-c8rj — Improper Input Validation in Apache Struts
  • CVE-2018-19322 — The GPCIDrv and GDrv low-level drivers in GIGABYTE APP Center v1.05.21 and earlier, AORUS GRAPHICS ENGINE before 1.57, XTREME GAMING ENGINE before 1.26, and OC…

All advisories for CWE-749

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor