Typosquatting and malicious packages
Publishing a malicious package or site with a name almost the same as a trusted one (like reqeusts for requests), hoping people install or visit it by mistake.
Understanding Typosquatting and malicious packages in Years 9–10 Digital Systems
What it does: colourama is a near-copy of the real name colorama. This is the typosquatting pattern of a lookalike name waiting for a typing mistake. If an attacker publishes a public package named after a company's private package, the installer may fetch the public malicious copy instead of the private one. Typosquatting relies on a name that looks almost identical to a trusted one, so a quick typo leads to installing the wrong thing. Package managers install exactly the name you type. If an attacker has published that misspelt name, you get their code. A trusted package usually has a known publisher and a high download count. A typosquat often has a new, unknown publisher and very few downloads.
Common mistakes: The package name is misspelt as 'reqeusts'. That is a typosquatting trap, because an attacker may have published a malicious package with that name. It should be 'pip install requests'. 'crossenv' drops the hyphen from the real package 'cross-env'. Typosquatters use look-alike names like this. The correct line is 'npm install cross-env'.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 41–69) and word search (Modules 41–79).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
typosquattingFill in the Blanks
Spot the Error
Student with a class code? Join your class →