Samedi 17 Octobre 2026 11:02:59 GMT+02:00

Netcrook

AccueilManifeste
Actualités
Techcrook
Geocrook
WikicrookÉquipeAppContact
EnglishItaliano

WIKICROOK

Prototype method

A function stored on a JavaScript object prototype and shared by instances through inheritance.

A prototype method is a function stored on a JavaScript object’s prototype, where it is shared by all instances created from that object or class. Instead of copying the same function into every object, JavaScript uses the prototype chain so each instance can call the shared method. This is normal language behavior and is widely used in libraries, frameworks, and application code.

In security work, prototype methods matter because malicious logic hidden there can look like ordinary library behavior and only run when the application calls the method at runtime. That makes it easier to bury a payload inside a dependency and harder to spot with install-time checks alone. Defenders should review package sources, inspect hot-path methods, verify exact package names and versions, and test dependencies during normal execution. In attacks, the dangerous code may not appear in obvious lifecycle scripts; it can trigger when a developer uses the API as intended.

← index WIKICROOK